DI updates
This commit is contained in:
@@ -58,9 +58,7 @@ namespace RebootKit.Engine.Foundation {
|
||||
Type type = typeof(T);
|
||||
|
||||
foreach (FieldInfo field in type.GetFields(k_fieldsBindingFlags)) {
|
||||
if (!InjectField(field, target)) {
|
||||
return;
|
||||
}
|
||||
InjectField(field, target);
|
||||
}
|
||||
|
||||
foreach (MethodInfo method in type.GetMethods(k_methodsBindingFlags)) {
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RebootKit.Engine.Foundation {
|
||||
public interface IService : IDisposable {
|
||||
UniTask OnInit(CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
public abstract class ServiceMonoBehaviour : MonoBehaviour, IService {
|
||||
public abstract UniTask OnInit(CancellationToken cancellationToken);
|
||||
public abstract void Dispose();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user