コード例 #1
0
        private async Task <AllocationMapPage> GetAllocationPage(int databaseId, PageAddress addresss)
        {
            var page = await PageReader.Read(databaseId, addresss);

            var result = new AllocationMapParser().Parse(page);

            return(result);
        }
コード例 #2
0
 static void Main(string[] args)
 {
     string path = @"D:\Wikipedia\jawiki-latest-pages-articles.xml";
     using (var reader = new PageReader(path))
     {
         foreach (var item in reader.Read())
         {
             Console.WriteLine(item.title);
         }
     }
 }
コード例 #3
0
        static void Main(string[] args)
        {
            string path = @"D:\Wikipedia\jawiki-latest-pages-articles.xml";

            using (var reader = new PageReader(path))
            {
                foreach (var item in reader.Read())
                {
                    Console.WriteLine(item.title);
                }
            }
        }
コード例 #4
0
        private void _work(ref KeyValuePair <string, Worker> pair)
        {
            var owner  = pair.Key;
            var worker = pair.Value;

            switch (worker.state)
            {
            case 0:     // init
                _loader.Load(owner);
                break;

            case 1:     // load complete
                _reader.Read(owner);
                break;
            }
        }