コード例 #1
0
        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);
        }
コード例 #2
0
        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);
            }
        }