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;
 }
 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);
 }
 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;
 }
Exemple #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;
        }
Exemple #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);
     }
 }
 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;
 }