public AzureBlobDestinationFileStoreService(DocGeneratorSettings docGeneratorSettings)
        {
            if (string.IsNullOrWhiteSpace(docGeneratorSettings.BlobStorageConnectionString))
            {
                throw new InvalidConfigurationException(typeof(DocGeneratorSettings), "The BlobStorageConnectionString is required when writing docs to azure.");
            }

            var storageAccount = CloudStorageAccount.Parse(docGeneratorSettings.BlobStorageConnectionString);

            _blobClient = storageAccount.CreateCloudBlobClient();
        }
Exemplo n.º 2
0
        public DocGenerator(DocGeneratorSettings docGeneratorSettings)
        {
            _docGeneratorSettings = docGeneratorSettings;

            if (docGeneratorSettings.UseAzure)
            {
                _fileWriterService = new AzureBlobDestinationFileStoreService(_docGeneratorSettings);
            }
            else
            {
                _fileWriterService = new FileSystemDestinationFileStoreService(_docGeneratorSettings.OutputPath);
            }
        }