Beispiel #1
0
 public static TypeProvider Parse(string str)
 {
     string[] tmp = str.Split(',');
     if (tmp.Length != 2)
     {
         throw new ArgumentException("错误的类型配置格式,请确保用半角逗号分割,前段为类型完全限定名,后段为命名空间");
     }
     var inst = new TypeProvider(tmp[0].Trim(' '), tmp[1].Trim(' '));
     return inst;
 }
Beispiel #2
0
        public static TypeProvider Parse(string str)
        {
            string[] tmp = str.Split(',');
            if (tmp.Length != 2)
            {
                throw new ArgumentException("错误的类型配置格式,请确保用半角逗号分割,前段为类型完全限定名,后段为命名空间");
            }
            var inst = new TypeProvider(tmp[0].Trim(' '), tmp[1].Trim(' '));

            return(inst);
        }