/// <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()); }
/// <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()); }