Exemplo n.º 1
0
 public IServiceSettings GetSettings()
 {
     IServiceSettings settings = new AzureSettings();
     settings.ClientID = LocalSettings.Values.Keys.Contains(CLIENT_ID) ? LocalSettings.Values[CLIENT_ID].ToString() : string.Empty;
     settings.TenantDomainName = LocalSettings.Values.Keys.Contains(DOMAIN_NAME) ? LocalSettings.Values[DOMAIN_NAME].ToString() : string.Empty;
     return settings;
 }
Exemplo n.º 2
0
 public IServiceSettings GetSettings()
 {
     IServiceSettings settings = new AzureSettings();
     settings.ClientID = "a71f197f-1ac6-4af7-b97b-003802963334";
     settings.TenantDomainName = "osceusllc.onmicrosoft.com";
     return settings;
 }
Exemplo n.º 3
0
 public ImagesController(FoodTruckContext context, AzureSettings azureSettings) : base(context)
 {
     _azureSettings = azureSettings;
 }
 public DocumentsController(FoodTruckContext context, AzureSettings azureSettings) : base(context)
 {
     _azureSettings = azureSettings;
 }
Exemplo n.º 5
0
 public AuthenticationService(IOptions <AzureSettings> settings)
 {
     _azureSettings = settings.Value;
 }
 public VirtualMachinesController(IOptions <AzureSettings> azureSettings)
 {
     this.azureSettings = azureSettings.Value;
 }
Exemplo n.º 7
0
 public BlobService(AzureSettings azureSettings)
 {
     this.azureSettings = azureSettings;
 }
Exemplo n.º 8
0
 public CloudPhotoStorage(IOptions <AzureSettings> options, IImageProcessor imageProcessor)
 {
     _settings       = options.Value;
     _imageProcessor = imageProcessor;
 }
Exemplo n.º 9
0
            public PeriodicBackupConfiguration CreateBackupConfiguration(string backupPath = null, BackupType backupType             = BackupType.Backup, bool disabled = false, string fullBackupFrequency = "0 0 1 1 *",
                                                                         string incrementalBackupFrequency       = null, long?taskId = null, string mentorNode          = null, BackupEncryptionSettings backupEncryptionSettings = null, AzureSettings azureSettings = null,
                                                                         GoogleCloudSettings googleCloudSettings = null, S3Settings s3Settings = null, RetentionPolicy retentionPolicy = null, string name                        = null)
            {
                var config = new PeriodicBackupConfiguration()
                {
                    BackupType          = backupType,
                    FullBackupFrequency = fullBackupFrequency,
                    Disabled            = disabled
                };

                if (taskId.HasValue)
                {
                    config.TaskId = taskId.Value;
                }
                if (string.IsNullOrEmpty(mentorNode) == false)
                {
                    config.MentorNode = mentorNode;
                }
                if (string.IsNullOrEmpty(name) == false)
                {
                    config.Name = name;
                }
                if (string.IsNullOrEmpty(incrementalBackupFrequency) == false)
                {
                    config.IncrementalBackupFrequency = incrementalBackupFrequency;
                }
                if (string.IsNullOrEmpty(backupPath) == false)
                {
                    config.LocalSettings = new LocalSettings {
                        FolderPath = backupPath
                    }
                }
                ;
                if (backupEncryptionSettings != null)
                {
                    config.BackupEncryptionSettings = backupEncryptionSettings;
                }
                if (azureSettings != null)
                {
                    config.AzureSettings = azureSettings;
                }
                if (googleCloudSettings != null)
                {
                    config.GoogleCloudSettings = googleCloudSettings;
                }
                if (s3Settings != null)
                {
                    config.S3Settings = s3Settings;
                }
                if (retentionPolicy != null)
                {
                    config.RetentionPolicy = retentionPolicy;
                }

                return(config);
            }
Exemplo n.º 10
0
 public AzureRestorePoints(SortedList <DateTime, RestorePoint> sortedList, TransactionOperationContext context, AzureSettings azureSettings) : base(sortedList, context)
 {
     _client = new RavenAzureClient(azureSettings);
 }
        public static async Task <IEnumerable <AzureVirtualMachines> > GetAllVMsAsync(AzureSettings azureSettings)
        {
            var azure = Azure
                        .Configure()
                        .Authenticate(azureSettings.GetAzureCredentials())
                        .WithSubscription(azureSettings.SubscriptionId);

            var listOfVms = await azure.VirtualMachines.ListAsync();

            return(listOfVms.Select(a => new AzureVirtualMachines(a, azure)).ToList());
        }
Exemplo n.º 12
0
 private DataService()
 {
     _settings = SettingsHelper.GetConfig();
 }
Exemplo n.º 13
0
 public BlobService(AzureSettings azure)
 {
     this.azure = azure;
 }
 public AzureServiceBus(AzureSettings settings)
 {
     Settings    = settings;
     QueueClient = GetQueueClient();
 }
Exemplo n.º 15
0
 public AzureQueueSubscriber(IAppLogger appLogger, AzureSettings azureSettings)
 {
     _appLogger     = appLogger;
     _azureSettings = azureSettings;
 }
Exemplo n.º 16
0
 public IndexModel(IOptions <AzureSettings> settings, IAzureService azureService)
 {
     _settings     = settings.Value;
     _azureService = azureService;
 }
Exemplo n.º 17
0
 public AzureQueuesStorage(AzureSettings settings)
 {
     Settings = settings;
 }
Exemplo n.º 18
0
 public AzureTokenService(IOptions <AzureSettings> settings)
 {
     _azureSettings = settings.Value;
 }