コード例 #1
0
 private static void InitOnce(IPlatform platform, string appId, string apikey, Environment environment, AppacitiveSettings settings)
 {
     var context = new AppContextState(platform, appId, apikey, environment, settings);
     // Register defaults
     DefaultRegistrations.ConfigureContainer(context.Container);
     // Setup platform specific registrations
     platform.Initialize(context);
     _context = context;
 }
コード例 #2
0
 public static void Initialize(IPlatform platform, string appId, string apikey, Environment environment, AppacitiveSettings settings = null)
 {
     // Setup container.
     // Setup current device.
     // Setup debugging.
     settings = settings ?? AppacitiveSettings.Default;
     if (Interlocked.CompareExchange(ref _isInitialized, INITIALIZED, NOT_INITIALIZED) == NOT_INITIALIZED)
         InitOnce(platform, appId, apikey, environment, settings);
 }
コード例 #3
0
 public AppContextState(IPlatform platform, string appId, string apiKey, Environment environment, AppacitiveSettings settings)
 {
     this.ApiKey = apiKey;
     this.Environment = environment;
     _user = new UserInfo(platform as IApplicationPlatform);
     this.Settings = settings ?? AppacitiveSettings.Default;
     this.AppId = appId;
     this.Platform = platform;
     this.Container = settings.Factory ?? AppacitiveSettings.Default.Factory;
 }
コード例 #4
0
        private static void InitOnce(IPlatform platform, string appId, string apikey, Environment environment, AppacitiveSettings settings)
        {
            var context = new AppContextState(platform, appId, apikey, environment, settings);

            // Register defaults
            DefaultRegistrations.ConfigureContainer(context.Container);
            // Setup platform specific registrations
            platform.Initialize(context);
            _context = context;
        }
コード例 #5
0
 public static void Initialize(IPlatform platform, string appId, string apikey, Environment environment, AppacitiveSettings settings = null)
 {
     // Setup container.
     // Setup current device.
     // Setup debugging.
     settings = settings ?? AppacitiveSettings.Default;
     if (Interlocked.CompareExchange(ref _isInitialized, INITIALIZED, NOT_INITIALIZED) == NOT_INITIALIZED)
     {
         InitOnce(platform, appId, apikey, environment, settings);
     }
 }
コード例 #6
0
 public AppContextState(IPlatform platform, string appId, string apiKey, Environment environment, AppacitiveSettings settings)
 {
     this.ApiKey      = apiKey;
     this.Environment = environment;
     _user            = new UserInfo(platform as IApplicationPlatform);
     this.Settings    = settings ?? AppacitiveSettings.Default;
     this.AppId       = appId;
     this.Platform    = platform;
     this.Container   = settings.Factory ?? AppacitiveSettings.Default.Factory;
 }