ccd512718d03125a3f678bd4c234f59a77e98121
[m17n/m17n-lib-cs.git] / database.cs
1 using System;
2 using System.Collections.Generic;
3 using System.IO;
4 using M17N;
5 using M17N.Core;
6
7 public class Test
8 {
9   public static void Main ()
10   {
11     //M17n.debug = true;
12     MDatabase.ApplicationDir = "/usr/local/share/m17n";
13     MDatabase.Tag tag = new MDatabase.Tag (MSymbol.Of ("input-method"),
14                                            MSymbol.t,
15                                            MSymbol.Of ("unicode"));
16
17     foreach (string dirname in MDatabase.DirectoryList ())
18       Console.WriteLine (dirname);
19
20     while (true)
21       {
22         Console.Write ("mdb> ");
23         string str = Console.ReadLine ();
24         if (str == null || str == "quit" || str == "exit")
25           break;
26         Console.WriteLine (MDatabase.Find (tag));
27       }
28   }
29 }