Ejemplo n.º 1
0
 /// <summary>
 /// ���ģ��
 /// </summary>
 /// <param name="tm">ģ���Ƕ���</param>
 public void Add(TemplateMark tm)
 {
     if (dic.ContainsKey(tm.Name))
     {
         throw new Exception(String.Format("Oops~ We already have a TemplateMark named [{0}]", tm.Name));
     }
     this.dic.Add(tm.Name, tm);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// ���ַ�����ȡ
 /// </summary>
 /// <param name="s">ģ���ַ���</param>
 public void Read(string s)
 {
     Clear();
     str = s;
     MatchCollection matches = Regex.Matches(str, @"<!--\s*(\{[\w\W]*?\})\s*-->");
     foreach (Match match in matches)
     {
         TemplateMark t = new TemplateMark();
         t.Read(match.Value);
         Add(t);
     }
 }
Ejemplo n.º 3
0
 static DataTable tc_OnGetData(TemplateMark tm)
 {
     return testData01;
 }