public void RegisterMethodAutorun(Func <T, ValueTask> autorunMethod) { IPropertyProxy propertyProxy = propertyProxyFactory.Create(RootObservableProperty); var store = propertyProxyWrapper.WrapPropertyObservable <T>(propertyProxy); IInvokableReactable target = new MethodAutorunContainer <T>(autorunMethod, store); ReactableInvoker <T> invoker = new ReactableInvoker <T>(target, this); invoker.PlantSubscriber(propertyProxy); }
private void RegisterStoreAutoruns() { foreach (var autorunMethod in storeMetadata.GetAutoruns()) { IPropertyProxy propertyProxy = propertyProxyFactory.Create(RootObservableProperty); var store = propertyProxyWrapper.WrapPropertyObservable <TStore>(propertyProxy); DependencyInjector.InjectDependency(store); IInvokableReactable target = new StoreAutorunContainer <TStore>(autorunMethod, store); ReactableInvoker <TStore> invoker = new ReactableInvoker <TStore>(target, this); invoker.PlantSubscriber(propertyProxy); } }