Ejemplo n.º 1
0
        public DeviceProvisioningHandler(ILogger <DeviceProvisioningHandler> logger, ISettings settings,
                                         IProvisioningClient provisioningClient, IPermanentClient permanentClient)
        {
            _logger             = logger;
            _settings           = settings;
            _provisioningClient = provisioningClient;
            _permanentClient    = permanentClient;

            _clientId = Guid.NewGuid();
        }
Ejemplo n.º 2
0
 public ProvisioningHelper(
     IProvisioningClient provisioningClient,
     LunaClient lunaClient,
     IStorageUtility storageUtility,
     ISqlDbContext context
     )
 {
     _provisioningClient = provisioningClient ?? throw new ArgumentNullException(nameof(provisioningClient));
     _lunaClient         = lunaClient ?? throw new ArgumentNullException(nameof(lunaClient));
     _storage            = storageUtility ?? throw new ArgumentNullException(nameof(storageUtility));
     _context            = context ?? throw new ArgumentNullException(nameof(context));
 }
Ejemplo n.º 3
0
        public ProvisioningService(ISqlDbContext sqlDbContext, IProvisioningClient provisioningClient,
                                   IFulfillmentClient fulfillmentclient, IIpAddressService ipAddressService,
                                   ISubscriptionParameterService subscriptionParameterService, IArmTemplateParameterService armTemplateParameterService,
                                   IWebhookParameterService webhookParameterService, IStorageUtility storageUtility, ILogger <ProvisioningService> logger)
        {
            _context                      = sqlDbContext ?? throw new ArgumentNullException(nameof(sqlDbContext));
            _provisioningClient           = provisioningClient ?? throw new ArgumentNullException(nameof(provisioningClient));
            _fulfillmentClient            = fulfillmentclient ?? throw new ArgumentNullException(nameof(fulfillmentclient));
            _ipAddressService             = ipAddressService ?? throw new ArgumentNullException(nameof(ipAddressService));
            _subscriptionParameterService = subscriptionParameterService ?? throw new ArgumentNullException(nameof(subscriptionParameterService));
            _armTemplateParameterService  = armTemplateParameterService ?? throw new ArgumentNullException(nameof(armTemplateParameterService));
            _webhookParameterService      = webhookParameterService ?? throw new ArgumentNullException(nameof(webhookParameterService));
            _storageUtility               = storageUtility ?? throw new ArgumentNullException(nameof(storageUtility));
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));

            //TODO: add the app settings.
            _maxRetry = 3;
        }