-
Notifications
You must be signed in to change notification settings - Fork 2
/
ExampleFunctionsAsync.cs
91 lines (79 loc) · 3.29 KB
/
ExampleFunctionsAsync.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
namespace Wacton.Desu.ExampleConsole
{
using System.Collections.Generic;
using System.Threading.Tasks;
using Wacton.Desu.Japanese;
using Wacton.Desu.Kanji;
using Wacton.Desu.Names;
using Wacton.Desu.Radicals;
using Wacton.Desu.Strokes;
public static class ExampleFunctionsAsync
{
public static async Task<IEnumerable<IJapaneseEntry>> GetJapaneseEntriesAsync()
{
var japaneseDictionary = new JapaneseDictionary();
var japaneseEntries = await japaneseDictionary.GetEntriesAsync();
return japaneseEntries;
}
public static async Task<IEnumerable<IJapaneseEntry>> ParseJapaneseEntriesAsync()
{
var japaneseEntries = await JapaneseDictionary.ParseEntriesAsync();
return japaneseEntries;
}
public static async Task<IEnumerable<INameEntry>> GetNameEntriesAsync()
{
var nameDictionary = new NameDictionary();
var nameEntries = await nameDictionary.GetEntriesAsync();
return nameEntries;
}
public static async Task<IEnumerable<INameEntry>> ParseNameEntriesAsync()
{
var nameEntries = await NameDictionary.ParseEntriesAsync();
return nameEntries;
}
public static async Task<IEnumerable<IKanjiEntry>> GetKanjiEntriesAsync()
{
var kanjiDictionary = new KanjiDictionary();
var kanjiEntries = await kanjiDictionary.GetEntriesAsync();
return kanjiEntries;
}
public static async Task<IEnumerable<IKanjiEntry>> ParseKanjiEntriesAsync()
{
var kanjiEntries = await KanjiDictionary.ParseEntriesAsync();
return kanjiEntries;
}
public static async Task<IDictionary<string, IEnumerable<string>>> GetKanjiToRadicalsAsync()
{
var radicalLookup = new RadicalLookup();
var kanjiToRadicals = await radicalLookup.GetKanjiToRadicalsAsync();
return kanjiToRadicals;
}
public static async Task<IDictionary<string, IEnumerable<string>>> ParseKanjiToRadicalsAsync()
{
var kanjiToRadicals = await RadicalLookup.ParseKanjiToRadicalsAsync();
return kanjiToRadicals;
}
public static async Task<IDictionary<string, IEnumerable<string>>> GetRadicalToKanjisAsync()
{
var radicalLookup = new RadicalLookup();
var radicalToKanjis = await radicalLookup.GetRadicalToKanjisAsync();
return radicalToKanjis;
}
public static async Task<IDictionary<string, IEnumerable<string>>> ParseRadicalToKanjisAsync()
{
var radicalToKanjis = await RadicalLookup.ParseRadicalToKanjisAsync();
return radicalToKanjis;
}
public static async Task<IDictionary<string, IEnumerable<string>>> GetKanjiToStrokesAsync()
{
var strokeLookup = new StrokeLookup();
var kanjiToStrokes = await strokeLookup.GetKanjiToStrokesAsync();
return kanjiToStrokes;
}
public static async Task<IDictionary<string, IEnumerable<string>>> ParseKanjiToStrokesAsync()
{
var kanjiToStrokes = await StrokeLookup.ParseKanjiToStrokesAsync();
return kanjiToStrokes;
}
}
}