/// <summary> /// Initializes a new instance of <see cref="AzureCloudService" /> /// </summary> public AzureCloudService(IAzureCloudServiceOptions options, ILoginProvider loginProvider) { // This is a terrible design, but there isn't a way to update the Mobile Service Client's // Handlers after it's been initialized. Client = new MobileServiceClient(options.AppServiceEndpoint, new AuthenticationDelegatingHandler(this)); if (!string.IsNullOrWhiteSpace(options.LoginUriPrefix)) { Client.LoginUriPrefix = options.LoginUriPrefix; } if (!string.IsNullOrWhiteSpace(options.AlternateLoginHost) && Uri.TryCreate(options.AlternateLoginHost, UriKind.Absolute, out Uri altHost)) { Client.AlternateLoginHost = altHost; } ; _loginProvider = loginProvider; }
/// <summary> /// Constructs a new <see cref="DryIocCloudServiceContext{TAccount}" /> /// </summary> public DryIocCloudServiceContext(IComponentContext context, IAzureCloudServiceOptions options, ILoginProvider <TAccount> loginProvider, string offlineDbPath = _offlineDbPath) : base(options, loginProvider, offlineDbPath) { Context = context; }
public AppDataContext(IUnityContainer container, IAzureCloudServiceOptions options, ILoginProvider <MobileAppUser> loginProvider) : base(container, options, loginProvider) // you can optionally pass in the data store name { }
public AppDataContext(IComponentContext context, IAzureCloudServiceOptions options, ILoginProvider <MobileAppUser> loginProvider) : base(context, options, loginProvider) // you can optionally pass in the data store name { }
public AppDataContext(IReadOnlyKernel kernel, IAzureCloudServiceOptions options, ILoginProvider <MobileAppUser> loginProvider) : base(options, loginProvider) // you can optionally pass in the data store name { _kernel = kernel; }
/// <summary> /// Initializes a new instance of the <see cref="AzureCloudServiceContext(IAzureCloudServiceOptions, ILoginProvider, string)" /> /// </summary> public AzureCloudServiceContext(IAzureCloudServiceOptions options, ILoginProvider <TAccount> loginProvider, string offlineDbPath = _offlineDbPath) : base(options, loginProvider) { OfflineDbPath = offlineDbPath; Initialize(); }
/// <summary> /// Creates a new <see cref="IMobileServiceClient"/> /// </summary> /// <param name="options"></param> /// <returns></returns> protected virtual IMobileServiceClient CreateMobileServiceClient(IAzureCloudServiceOptions options) { return(new MobileServiceClient(options.AppServiceEndpoint, GetHandlers())); }
/// <summary> /// Constructs a new <see cref="UnityCloudServiceContext" /> /// </summary> public UnityCloudServiceContext(IUnityContainer container, IAzureCloudServiceOptions options, ILoginProvider <TAccount> loginProvider, string offlineDbPath = _offlineDbPath) : base(options, loginProvider, offlineDbPath) { Container = container; }
/// <summary> /// Constructs a new <see cref="DryIocCloudServiceContext" /> /// </summary> public DryIocCloudServiceContext(IContainer container, IAzureCloudServiceOptions options, ILoginProvider loginProvider, string offlineDbPath = _offlineDbPath) : base(options, loginProvider, offlineDbPath) { Container = container; }