Beispiel #1
0
        public AzureFS(string inputConnectionString)
        {
            _inputFS = _azure;

            if (String.IsNullOrEmpty(inputConnectionString))
            {
                throw new ArgumentNullException(nameof(inputConnectionString));
            }

            _inputFS.AddStorageAccount("azure", inputConnectionString);
            _inputFS.SetWorkingFolder("wasb://azure/web");
        }
Beispiel #2
0
        public AzureFS(string inputConnectionString, string container)
        {
            _inputFS = _azure;

            if (String.IsNullOrEmpty(inputConnectionString))
            {
                throw new ArgumentNullException(nameof(inputConnectionString));
            }

            if (container == null)
            {
                throw new ArgumentNullException(nameof(container));
            }

            _inputFS.AddStorageAccount("azure", inputConnectionString);
            _inputFS.SetWorkingFolder($"wasb://azure/{container}");
        }
Beispiel #3
0
        public void Run(string inputStorageAccount, string queueStorageAccount, string queueName)
        {
            _inputStorageAccount = inputStorageAccount;
            _queueStorageAccount = queueStorageAccount;
            _queueName           = queueName;

            var input = new AzureBlobFileSystem();

            input.AddStorageAccount("input", inputStorageAccount);
            input.SetWorkingFolder("wasb://input");
            var container = input.GetFolder("pdf");

            var itens = container.EnumItems();

            var itens_added = ProcessItensAsync(itens, "pdf").GetAwaiter().GetResult();

            Console.WriteLine($"{itens_added} message(s) added to the queue !");
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Console Queue");

            _config = new Config(args);

            var input = new AzureBlobFileSystem();

            input.AddStorageAccount("input", _config.Get("INPUT_STORAGE_ACCOUNT"));
            input.SetWorkingFolder("wasb://input");
            var container = input.GetFolder("pdf");

            var itens = container.EnumItems();

            var itens_added = ProcessItensAsync(itens, "pdf").GetAwaiter().GetResult();

            Console.WriteLine($"{itens_added} message(s) added to the queue !");
        }