Beispiel #1
0
        static void Main(string[] args)
        {
            //http://blog.danskingdom.com/adding-and-accessing-custom-sections-in-your-c-app-config/

            /*
             * var syncsource = ConfigurationManager.GetSection("SyncSource") as NameValueCollection;
             * if (syncsource != null)
             * {
             *  foreach (string key in syncsource)
             *  {
             *      Console.WriteLine(syncsource[key].ToString());
             *  }
             * }
             */

            ISyncBusiness syncbusiness = new SyncBusiness(
                FileRepositoryFactory((NameValueCollection)ConfigurationManager.GetSection("SyncSource")),
                FileRepositoryFactory((NameValueCollection)ConfigurationManager.GetSection("SyncDestination"))
                );

            var result = syncbusiness.Sync();

            Console.WriteLine("Folder:" + result.Folder);
            Console.WriteLine("File:" + result.File);

            Console.Read();
        }
Beispiel #2
0
        public void WinToWinTest()
        {
            _source      = new WindowsFileRepository(@"D:\CodeProject\SyncFile\temp1");
            _destination = new WindowsFileRepository(@"D:\CodeProject\SyncFile\temp2");

            ISyncBusiness isyncbusiness = new SyncBusiness(_source, _destination);

            isyncbusiness.Sync();
        }
Beispiel #3
0
        public void WinToTrelloTest()
        {
            _source = new WindowsFileRepository(@"D:\CodeProject\SyncFile\temp1");

            _destination = new TrelloFileRepository(
                ConfigurationManager.AppSettings["key"],
                ConfigurationManager.AppSettings["token"],
                ConfigurationManager.AppSettings["list"]
                );

            ISyncBusiness isyncbusiness = new SyncBusiness(_source, _destination);

            isyncbusiness.Sync();
        }