예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheService" /> class.
        /// </summary>
        /// <param name="service">Provides access to core services.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="service" /> is null.
        /// </exception>
        public CacheService(IMigrationService service)
        {
            service.AssertNotNull(nameof(service));

            protector    = new MachineKeyDataProtector(new[] { typeof(CacheService).FullName });
            this.service = service;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthenticationProvider"/> class.
        /// </summary>
        /// <param name="service">Provides access to core services.</param>
        /// <param name="customerId">Identifier for customer whose resources are being accessed.</param>
        /// <exception cref="System.ArgumentException">
        /// <paramref name="customerId"/> is empty or null.
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="service"/> is null.
        /// </exception>
        public AuthenticationProvider(IMigrationService service, string customerId)
        {
            service.AssertNotNull(nameof(service));
            customerId.AssertNotEmpty(nameof(customerId));

            this.customerId = customerId;
            this.service    = service;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MigrationManager"/> class.
        /// </summary>
        /// <param name="service">Provides access to core services.</param>
        /// <param name="scriptManager">Provides the ability to invoke scripts.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="service"/> is null
        /// or
        /// <paramref name="scriptManager"/> is null.
        /// </exception>
        public MigrationManager(IMigrationService service, IScriptManager scriptManager)
        {
            scriptManager.AssertNotNull(nameof(scriptManager));
            service.AssertNotNull(nameof(service));

            this.scriptManager = scriptManager;
            this.service       = service;
        }
예제 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GraphClient"/> class.
        /// </summary>
        /// <param name="service">Provides access to core application services.</param>
        /// <param name="client">Provides the ability to interact with the Microsoft Graph.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="service"/> is null.
        /// or
        /// <paramref name="client"/> is null.
        /// </exception>
        public GraphClient(IMigrationService service, IGraphServiceClient client)
        {
            service.AssertNotNull(nameof(service));
            client.AssertNotNull(nameof(client));

            this.service = service;
            this.client  = client;
        }
예제 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GraphClient"/> class.
        /// </summary>
        /// <param name="service">Provides access to core application services.</param>
        /// <param name="customerId">Identifier for customer whose resources are being accessed.</param>
        /// <exception cref="ArgumentException">
        /// <paramref name="customerId"/> is empty or null.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="service"/> is null.
        /// </exception>
        public GraphClient(IMigrationService service, string customerId)
        {
            service.AssertNotNull(nameof(service));
            customerId.AssertNotEmpty(nameof(customerId));

            this.customerId = customerId;
            this.service    = service;
            client          = new GraphServiceClient(new AuthenticationProvider(this.service, customerId));
        }
예제 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheService"/> class.
        /// </summary>
        /// <param name="service">Provides access to core services.</param>
        /// <param name="connection">Connection to utilized to communicate with the Redis Cache instance.</param>
        /// <param name="dataProtector">Provides protection for data being cached.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="service"/> is null.
        /// or
        /// <paramref name="connection"/> is null.
        /// or
        /// <paramref name="dataProtector"/> is null.
        /// </exception>
        public CacheService(IMigrationService service, IConnectionMultiplexer connection, IDataProtector dataProtector)
        {
            service.AssertNotNull(nameof(service));
            connection.AssertNotNull(nameof(connection));
            dataProtector.AssertNotNull(nameof(dataProtector));

            this.connection = connection;
            protector       = dataProtector;
            this.service    = service;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="DistributedTokenCache"/> class.
        /// </summary>
        /// <param name="service">Provides access to core services.</param>
        /// <param name="resource">The resource being accessed.</param>
        /// <param name="key">The unique identifier for the cache entry.</param>
        /// <exception cref="ArgumentException">
        /// <paramref name="resource"/> is empty or null.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="service"/> is null.
        /// </exception>
        public DistributedTokenCache(IMigrationService service, string resource, string key = null)
        {
            service.AssertNotNull(nameof(service));
            resource.AssertNotEmpty(nameof(resource));

            this.service  = service;
            keyValue      = key;
            this.resource = resource;

            AfterAccess  = AfterAccessNotification;
            BeforeAccess = BeforeAccessNotification;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseController"/> class.
 /// </summary>
 /// <param name="service">Provides access to core services.</param>
 /// <exception cref="System.ArgumentNullException">
 /// <paramref name="service"/> is null.
 /// </exception>
 protected BaseController(IMigrationService service)
 {
     service.AssertNotNull(nameof(service));
     Service = service;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StorageService"/> class.
 /// </summary>
 /// <param name="service">Provides access to core services.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="service"/> is null.
 /// </exception>
 public StorageService(IMigrationService service)
 {
     service.AssertNotNull(nameof(service));
     this.service = service;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PartnerOperations"/> class.
 /// </summary>
 /// <param name="service">Provides access to core services.</param>
 /// <exception cref="ArgumentException">
 /// <paramref name="service"/> is null.
 /// </exception>
 public PartnerOperations(IMigrationService service)
 {
     service.AssertNotNull(nameof(service));
     this.service = service;
 }
 /// <summary>
 /// Initialize a new instance of the <see cref="MigrationManager"/> class.
 /// </summary>
 /// <param name="service">Provides access to core services.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="service"/> is null
 /// </exception>
 public MigrationManager(IMigrationService service)
 {
     service.AssertNotNull(nameof(service));
     scriptManager = new ScriptManager(service);
     this.service  = service;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceBusClient"/> class.
 /// </summary>
 /// <param name="service">Provides access to core services.</param>
 public ServiceBusClient(IMigrationService service)
 {
     service.AssertNotNull(nameof(service));
     this.service = service;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TokenManagement"/> class.
 /// </summary>
 /// <param name="service">Provides access to core services.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="service"/> is null.
 /// </exception>
 public TokenManagement(IMigrationService service)
 {
     service.AssertNotNull(nameof(service));
     this.service = service;
 }
예제 #14
0
 /// <summary>
 /// Initialize a new instance of the <see cref="ConfigurationService"/> class.
 /// </summary>
 /// <param name="service">Provides access to core services.</param>
 public ConfigurationService(IMigrationService service)
 {
     service.AssertNotNull(nameof(service));
     this.service = service;
 }