Example #1
0
 //public string ManageResource = "https://management.chinacloudapi.cn";
 //public string LogAnalyResource = "https://api.loganalytics.azure.cn";
 public AKSBus(IAKSDto aKSDto, ITokenDto tokenDto, IAccountDao accountDao, IOptions <TokenResourceModel> tokenResource)
 {
     this._aKSDto   = aKSDto;
     this._tokenDto = tokenDto;
     _accountDao    = accountDao;
     _tokenResource = tokenResource;
 }
Example #2
0
 public ResourceGroupBus(IResourceGroupDto resourceGroupDto,
                         IConfiguration configuration,
                         ITokenDto tokenDto)
 {
     this._resourceGroupDto = resourceGroupDto;
     this._configuration    = configuration;
     this._tokenDto         = tokenDto;
 }
Example #3
0
 public ValuesController(IOptions <AccountModel> account, IConfiguration configuration, IAccountBus accountBus, ITokenDto tokenDto, IMemoryCache cache)
 {
     _configuration = configuration;
     this._account  = account.Value;
     _accountBus    = accountBus;
     _tokenDto      = tokenDto;
     _cache         = cache;
 }
Example #4
0
 //public string LogAnalyResource = "https://api.loganalytics.azure.cn";
 // apilog="https://api.loganalytics.azure.cn"
 // portallog="https://portal.loganalytics.azure.cn"
 public MonitorBus(IMonitorDto monitorDto, ITokenDto tokenDto,
                   IAccountDao accountDao, IOptions <TokenResourceModel> tokenResource)
 {
     _monitorDto    = monitorDto;
     _tokenDto      = tokenDto;
     _accountDao    = accountDao;
     _tokenResource = tokenResource;
 }
Example #5
0
 public void SetToken(ITokenDto dto)
 {
     if (dto?.Value == null)
     {
         return;
     }
     Token = dto;
     HttpClient.DefaultRequestHeaders.Remove("Authorization");
     HttpClient.DefaultRequestHeaders.Add("Authorization", Token.Value);
 }
        public IoTHubResourceBus(
            ITokenDto tokenDto,
            IIoTHubResourceDto ioTHubResourceDto,
            IConfiguration configuration)
        {
            this._tokenDto          = tokenDto;
            this._ioTHubResourceDto = ioTHubResourceDto;
            this._configuration     = configuration;

            //this._accountModel = accountModel;
        }
Example #7
0
 //public string ManageResource = "https://management.chinacloudapi.cn";
 //public string LogAnalyResource = "https://api.loganalytics.azure.cn";
 public ResourceGroupBus(IResourceGroupDto resourceGroupDto,
                         IConfiguration configuration,
                         ITokenDto tokenDto,
                         ISubscriptionDto subscriptionDto,
                         IAccountDao accountDao,
                         IOptions <TokenResourceModel> tokenResource)
 {
     this._resourceGroupDto = resourceGroupDto;
     this._configuration    = configuration;
     this._tokenDto         = tokenDto;
     this._subscriptionDto  = subscriptionDto;
     _tokenResource         = tokenResource;
     //this.subid = "6273fbea-8a11-498b-8218-02b6f4398e12";
 }
Example #8
0
        public IoTHubResourceBus(
            ITokenDto tokenDto,
            ISubscriptionDto subscriptionDto,
            IIoTHubResourceDto ioTHubResourceDto,
            IConfiguration configuration,
            IAccountDao accountDao,
            IOptions <TokenResourceModel> tokenResource)
        {
            _accountDao             = accountDao;
            this._tokenDto          = tokenDto;
            this._ioTHubResourceDto = ioTHubResourceDto;
            this._configuration     = configuration;
            _subscriptionDto        = subscriptionDto;
            _tokenResource          = tokenResource;
            //this.subid= "6273fbea-8a11-498b-8218-02b6f4398e12";

            //this._accountModel = accountModel;
        }
Example #9
0
 public void SetToken(ITokenDto token)
 {
     _connectorClient.SetToken(token);
 }