// // CONV用テストルーチン // // using System; using furu; // Hashtable用 using System.Collections; public class foo : f_conv_obj { public override string m_conv(string b, string param) { string ret; ret = "\nbase:" + b + "\n" + "param:" + param + "\n"; return ret; } } class test { public static void Main() { f_conv c = new f_conv(); // テスト用文字列(テンプレートイメージ)の設定 string s = "before string %%%a%%% and %%%b%%% and %%%c%%% $$$ma:papa$$$ base is OK? $$$/ma$$$ after string"; s += "\n%%%aa%%% %%%2%%%"; s += "\ntoku1***tttt:1***"; s += "\ntoku2***tttt:2***"; s += "\ntoku3***tttt:3***"; // データの設定:単置換 c.monoDic("a", "aaa"); c.monoDic("b", "bbb"); c.monoDic("c", "ccc"); // データの設定:複置換 foo f = new foo(); c.multiDic("ma", f); // データの設定:単置換特殊 ArrayList v = new ArrayList(); v.Add("1"); v.Add("3"); v.Add("4"); c.monoDicToku("tttt", "yes", "no", v); // 出力 // XXX コメントアウト部分は「時間計測」用 //Console.WriteLine( ((System.DateTime.Now).Ticks).ToString()); Console.WriteLine(c.conv(s)); //Console.WriteLine( ((System.DateTime.Now).Ticks).ToString()); } } // end of class