示例#1
0
        private IosDependencyContainer(TogglPresenter viewPresenter, ApiEnvironment environment, Platform platform, string version)
            : base(environment, new UserAgent(platform.ToString(), version))
        {
            ViewPresenter = viewPresenter;

            var appVersion = Version.Parse(version);

            settingsStorage = new Lazy <SettingsStorage>(() => new SettingsStorage(appVersion, KeyValueStorage));
        }
示例#2
0
        public static void EnsureInitialized(TogglPresenter viewPresenter, ApiEnvironment environment, Platform platform, string version)
        {
            if (Instance != null)
            {
                return;
            }

            Instance = new IosDependencyContainer(viewPresenter, environment, platform, version);
            UIDependencyContainer.Instance = Instance;
        }