Example #1
0
        private void InitializeDependencies(IApplicationStateManagerInitializer applicationStateManagerInitializer)
        {
            if (applicationStateManagerInitializer == null)
            {
                throw new ArgumentNullException(nameof(applicationStateManagerInitializer));
            }

            ApplicationStateManagerBase.InitializePlatformInstance(applicationStateManagerInitializer);
        }
        public static ApplicationStateManagerBase InitializePlatformInstance(IApplicationStateManagerInitializer initializer)
        {
            ApplicationStateManagerBase applicationStateManagerBase = null;

            if (initializer == null)
            {
                throw new ArgumentNullException(nameof(initializer));
            }

            applicationStateManagerBase         = initializer.CreatePlatformInstance();
            ApplicationStateManagerBase.Current = applicationStateManagerBase;
            return(applicationStateManagerBase);
        }