コード例 #1
0
ファイル: Store.cs プロジェクト: xperiandri/blazor-fluxor
        /// <summary>
        /// Creates an instance of the store
        /// </summary>
        /// <param name="browserInteropService">The BrowserInteropService the Browser will use to initialise the store</param>
        public Store(IBrowserInteropService browserInteropService)
        {
            MethodInfo dispatchNotifictionFromStoreMethodInfo =
                typeof(IFeature)
                .GetMethod(nameof(IFeature.ReceiveDispatchNotificationFromStore));

            IFeatureReceiveDispatchNotificationFromStore = (Action <IFeature, object>)
                                                           Delegate.CreateDelegate(typeof(Action <IFeature, object>), dispatchNotifictionFromStoreMethodInfo);

            BrowserInteropService             = browserInteropService;
            BrowserInteropService.PageLoaded += OnPageLoaded;
            Dispatch(new StoreInitializedAction());
        }
コード例 #2
0
 /// <summary>
 /// Creates an instance of the store
 /// </summary>
 /// <param name="browserInteropService">The BrowserInteropService the Browser will use to initialise the store</param>
 public Store(IBrowserInteropService browserInteropService)
 {
     BrowserInteropService             = browserInteropService;
     BrowserInteropService.PageLoaded += OnPageLoaded;
     Dispatch(new StoreInitializedAction());
 }