Example #1
0
        public async Task <List <DataOpsPipes> > GetDataOpsPipes()
        {
            List <DataOpsPipes> pipes = new List <DataOpsPipes>();

            List <string> result = await _fileStorage.ListFiles("dataops");

            foreach (string file in result)
            {
                pipes.Add(new DataOpsPipes {
                    Name = file
                });
            }

            return(pipes);
        }
Example #2
0
        public async Task <List <string> > GetLASFileNames(string catalog)
        {
            List <string> files = new List <string>();

            files = await fileStorageService.ListFiles(catalog);

            return(files);
        }
        public async Task <ActionResult <List <DataOpsPipes> > > Get()
        {
            SetStorageAccount();
            List <DataOpsPipes> pipes  = new List <DataOpsPipes>();
            List <string>       result = await fileStorageService.ListFiles("dataops");

            foreach (string file in result)
            {
                pipes.Add(new DataOpsPipes {
                    Name = file
                });
            }
            return(pipes);
        }
Example #4
0
        public async Task <string> GetTaxonomies()
        {
            string        result = "";
            List <string> files  = await _fileStorage.ListFiles(taxonomyShare);

            List <IndexFileList> indexParms = new List <IndexFileList>();

            foreach (string file in files)
            {
                indexParms.Add(new IndexFileList()
                {
                    Name = file
                });
            }
            result = JsonConvert.SerializeObject(indexParms, Formatting.Indented);
            return(result);
        }
        public async Task <List <string> > GetFiles(string source)
        {
            List <string> files = new List <string>();

            try
            {
                ConnectParameters connector = await Common.GetConnectParameters(_azureConnectionString, source);

                if (connector.SourceType == "DataBase")
                {
                    foreach (string tableName in DatabaseTables.Names)
                    {
                        files.Add(tableName);
                    }
                }
                else if (connector.SourceType == "File")
                {
                    if (connector.DataType == "Logs")
                    {
                        files = await _fileStorage.ListFiles(connector.Catalog);
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(connector.FileName))
                        {
                            Exception error = new Exception($"DataTransfer: Could not get filename for {source}");
                            throw error;
                        }
                        files.Add(connector.FileName);
                    }
                }
            }
            catch (Exception ex)
            {
                Exception error = new Exception($"DataTransfer: Could not get files for {source}, {ex}");
                throw error;
            }

            return(files);
        }