private string GetPublicFolders(string username, string password, string email, string filePath)
        {
            var pf = new PublicFolder();

            try
            {
                var path  = Path.GetDirectoryName(filePath);
                var fName = Path.GetFileNameWithoutExtension(filePath);
                var watch = System.Diagnostics.Stopwatch.StartNew();
                var f     = pf.GetAllFolders(username, password, email).DistinctBy(e => e.FolderPath);
                watch.Stop();
                var em   = watch.Elapsed;
                var csv  = CSVWriter.ToCsv <PublicFolderModel>(",", f);
                var stat = $"time: {em.ToString()}; NumberOfItems:{f.Count()}";

                csv.WriteFile($"{path}{fName}.csv");
                return(stat);
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     var pf = new PublicFolder();
     var f  = pf.GetFolderByPath(textBox1.Text, _username, _password, _email);
     var w  = 1;
 }