Exemplo n.º 1
0
 public FileUploadManager(
     IFileMetadataRepository fileMetadataRepository,
     IAzureAccountManager azureAccountManager,
     IConfiguration configuration)
 {
     _fileMetadataRepository = fileMetadataRepository;
     _azureAccountManager    = azureAccountManager;
     _configuration          = configuration;
 }
        public AddEditAzureAccountViewModel(
            INavigationService navigationService,
            IAzureAccountManager azureAccountManager)
        {
            this.navigationService   = navigationService;
            this.azureAccountManager = azureAccountManager;

            this.Environments        = azureAccountManager.Environments;
            this.SelectedEnvironment = azureAccountManager.Environments.FirstOrDefault(e => e.IsDefault);

            this.TenantId = new ValidatableObject <string>(
                new List <IValidationRule <string> >()
            {
                new IsNotNullOrEmptyRule <string>
                {
                    ValidationMessage = AppResources.AddEditAzureAccountPage_TenantId_IsNotNullOrEmptyRule_Message
                }
            });

            this.ClientId = new ValidatableObject <string>(
                new List <IValidationRule <string> >()
            {
                new IsNotNullOrEmptyRule <string>
                {
                    ValidationMessage = AppResources.AddEditAzureAccountPage_ClientId_IsNotNullOrEmptyRule_Message
                }
            });

            this.ClientSecret = new ValidatableObject <string>(
                new List <IValidationRule <string> >()
            {
                new IsNotNullOrEmptyRule <string>
                {
                    ValidationMessage =
                        AppResources.AddEditAzureAccountPage_ClientSecret_IsNotNullOrEmptyRule_Message
                }
            });
        }
Exemplo n.º 3
0
 public AzureFileUploader(IConfiguration configuration, IAzureAccountManager azureAccountManager)
 {
     _configuration       = configuration;
     _azureAccountManager = azureAccountManager;
     _fileMetadata        = new FileMetadata();
 }