Type GetForType() { MappingTypeAttribute attr = Attribute.GetCustomAttribute(MType, typeof(MappingTypeAttribute)) as MappingTypeAttribute; if (attr == null) { return(null); } return(attr.ForType); }
public static IGcl Load(Type type, CnEnDict wordDict) { MappingTypeAttribute mattr = Attribute.GetCustomAttribute(type, typeof(MappingTypeAttribute)) as MappingTypeAttribute; if (mattr != null) { return(new MappingGcl(type, wordDict)); } TKTClassAttribute tcAttr = Attribute.GetCustomAttribute(type, typeof(TKTClassAttribute)) as TKTClassAttribute; if (tcAttr != null) { return(new TktGcl(type, wordDict)); } return(null); }