예제 #1
0
        static void KvpCrawler()
        {
            // string endpoint, string userGuid, string container, string apiKey, string key
            string endpoint  = Common.InputString("Endpoint:", null, false);
            string userGuid  = Common.InputString("User GUID:", null, true);
            string container = Common.InputString("Container:", null, false);
            string apiKey    = Common.InputString("API Key:", null, false);
            string key       = Common.InputString("Key:", null, false);

            KvpbaseCrawler kc = new KvpbaseCrawler(endpoint, userGuid, container, apiKey, key);
            CrawlResult    cr = kc.Get();

            if (_OutputType.Equals("console"))
            {
                EnumerateCrawlResult(cr);
            }
            ParseCrawlResult(cr);
        }
예제 #2
0
파일: Program.cs 프로젝트: jchristn/komodo
        static void KvpCrawler()
        {
            // string endpoint, string userGuid, string container, string apiKey, string key
            string endpoint  = Common.InputString("Endpoint:", null, false);
            string userGuid  = Common.InputString("User GUID:", null, true);
            string container = Common.InputString("Container:", null, false);
            string apiKey    = Common.InputString("API Key:", null, false);
            string key       = Common.InputString("Key:", null, false);

            KvpbaseCrawler kc = new KvpbaseCrawler(endpoint, userGuid, container, apiKey, key);

            CrawlResult cr = kc.Get();

            Console.WriteLine("Success        : " + cr.Success);
            Console.WriteLine("Start time     : " + cr.Time.Start.ToString());
            Console.WriteLine("End time       : " + cr.Time.End.ToString());
            Console.WriteLine("Total ms       : " + cr.Time.TotalMs.ToString() + "ms");
            Console.WriteLine("Content length : " + cr.ContentLength + " bytes");
            Console.WriteLine("Metadata       : " + Common.SerializeJson(cr.Metadata, false));
            Console.WriteLine("Data           :" + Environment.NewLine + Encoding.UTF8.GetString(cr.Data));
        }