/// <summary>
 /// Initialize the SDK for a windows phone app.
 /// </summary>
 /// <param name="appId">App id for the app on appacitive.</param>
 /// <param name="apikey">API key for the app on appacitive.</param>
 /// <param name="environment">The environment to use - sandbox or live.</param>
 /// <param name="settings">Additional settings for initializing the SDK.</param>
 public static void Initialize(string appId, string apikey, Environment environment, AppacitiveSettings settings = null)
 {
     #if WINDOWS_PHONE
     InternalApp.Initialize(Platforms.WP8, appId, apikey, environment, settings);
     #elif WINDOWS_PHONE7
     InternalApp.Initialize(Platforms.WP7, appId, apikey, environment, settings);
     #endif
 }
示例#2
0
 public static void Initialize(IApplicationHost host, string apiKey, Environment environment, AppacitiveSettings settings = null)
 {
     settings = settings ?? AppacitiveSettings.Default;
     // Set the api key
     AppacitiveContext.ApiKey = apiKey;
     // Set the environment
     AppacitiveContext.Environment = environment;
     // Set the factory
     AppacitiveContext.ObjectFactory = settings.Factory ?? AppacitiveSettings.Default.Factory;
     // Register defaults
     RegisterDefaults(AppacitiveContext.ObjectFactory);
     // Initialize host
     host.InitializeContainer(AppacitiveContext.ObjectFactory);
 }
示例#3
0
 public static void Initialize(IApplicationHost host, string apiKey, Environment environment, AppacitiveSettings settings = null)
 {
     if (Interlocked.CompareExchange(ref _initialized, 1, 0) == 0)
     {
         settings = settings ?? AppacitiveSettings.Default;
         // Set the api key
         AppacitiveContext.ApiKey = App.Apikey = apiKey;
         // Set the environment
         AppacitiveContext.Environment = App.Environment = environment;
         // Use api session
         AppacitiveContext.UseApiSession = settings.UseApiSession;
         // Set the factory
         AppacitiveContext.ObjectFactory = settings.Factory ?? AppacitiveSettings.Default.Factory;
         // Register defaults
         RegisterDefaults(AppacitiveContext.ObjectFactory);
         // Initialize host
         host.InitializeContainer(AppacitiveContext.ObjectFactory);
         // Setup real time connections
         App.EnableRealtime = settings.EnableRealTimeSupport;
         if (settings.EnableRealTimeSupport == true)
             StartRealTime().Wait();
         
     }
 }
 /// <summary>
 /// Initialize the Appacitive SDK with a customized platform implementation for windows phone app.
 /// </summary>
 /// <param name="platform">Custom device platform implementation</param>
 /// <param name="appId">App id for the app on appacitive.</param>
 /// <param name="apikey">API key for the app on appacitive.</param>
 /// <param name="environment">The environment to use - sandbox or live.</param>
 /// <param name="settings">Additional settings for initializing the SDK.</param>
 public static void Initialize(IDevicePlatform platform, string appId, string apikey, Environment environment, AppacitiveSettings settings = null)
 {
     InternalApp.Initialize(platform, appId, apikey, environment, settings);
 }
示例#5
0
 /// <summary>
 /// Initialize the SDK for a windows phone app.
 /// </summary>
 /// <param name="appId">App id for the app on appacitive.</param>
 /// <param name="apikey">API key for the app on appacitive.</param>
 /// <param name="environment">The environment to use - sandbox or live.</param>
 /// <param name="settings">Additional settings for initializing the SDK.</param>
 public static void Initialize(string appId, string apikey, Environment environment, AppacitiveSettings settings = null)
 {
     #if WINDOWS_PHONE
     InternalApp.Initialize(Platforms.WP8, appId, apikey, environment, settings);
     #elif WINDOWS_PHONE7
     InternalApp.Initialize(Platforms.WP7, appId, apikey, environment, settings);
     #endif
 }
示例#6
0
 /// <summary>
 /// Initialize the Appacitive SDK with a customized platform implementation for windows phone app.
 /// </summary>
 /// <param name="platform">Custom device platform implementation</param>
 /// <param name="appId">App id for the app on appacitive.</param>
 /// <param name="apikey">API key for the app on appacitive.</param>
 /// <param name="environment">The environment to use - sandbox or live.</param>
 /// <param name="settings">Additional settings for initializing the SDK.</param>
 public static void Initialize(IDevicePlatform platform, string appId, string apikey, Environment environment, AppacitiveSettings settings = null)
 {
     InternalApp.Initialize(platform, appId, apikey, environment, settings);
 }
示例#7
0
 public static void Initialize(IApplicationHost host, string apiKey, Environment environment, AppacitiveSettings settings = null)
 {
     if (Interlocked.CompareExchange(ref _initialized, 1, 0) == 0)
     {
         settings = settings ?? AppacitiveSettings.Default;
         // Set the api key
         AppacitiveContext.ApiKey = App.Apikey = apiKey;
         // Set the environment
         AppacitiveContext.Environment = App.Environment = environment;
         // Use api session
         AppacitiveContext.UseApiSession = settings.UseApiSession;
         // Set the factory
         AppacitiveContext.ObjectFactory = settings.Factory ?? AppacitiveSettings.Default.Factory;
         // Register defaults
         RegisterDefaults(AppacitiveContext.ObjectFactory);
         // Initialize host
         host.InitializeContainer(AppacitiveContext.ObjectFactory);
         // Setup real time connections
         App.EnableRealtime = settings.EnableRealTimeSupport;
         if (settings.EnableRealTimeSupport == true)
         {
             StartRealTime().Wait();
         }
     }
 }
 /// <summary>
 /// Initialize the SDK for use inside an ASP.net application.
 /// </summary>
 /// <param name="appId">App id for the app on appacitive.</param>
 /// <param name="apikey">API key for the app on appacitive.</param>
 /// <param name="environment">The environment to use - sandbox or live.</param>
 /// <param name="settings">Additional settings for initializing the SDK.</param>
 public static void InitializeForAspnet(string appId, string apikey, Environment environment, AppacitiveSettings settings = null)
 {
     InternalApp.Initialize(Platforms.Aspnet, appId, apikey, environment, settings);
 }
示例#9
0
 /// <summary>
 /// Initialize the SDK for use inside an ASP.net application.
 /// </summary>
 /// <param name="appId">App id for the app on appacitive.</param>
 /// <param name="apikey">API key for the app on appacitive.</param>
 /// <param name="environment">The environment to use - sandbox or live.</param>
 /// <param name="settings">Additional settings for initializing the SDK.</param>
 public static void InitializeForAspnet(string appId, string apikey, Environment environment, AppacitiveSettings settings = null)
 {
     InternalApp.Initialize(Platforms.Aspnet, appId, apikey, environment, settings);
 }