Inheritance: System.Attribute
コード例 #1
0
ファイル: Command.cs プロジェクト: newbish/hfmcmd
 /// Constructor
 public Factory(MemberInfo mi, FactoryAttribute fa)
 {
     _memberInfo       = mi;
     _factoryAttribute = fa;
     if (mi is MethodInfo)
     {
         ReturnType = (mi as MethodInfo).ReturnType;
     }
     else if (mi is PropertyInfo)
     {
         ReturnType = (mi as PropertyInfo).PropertyType;
     }
     else if (mi is ConstructorInfo)
     {
         ReturnType = (mi as ConstructorInfo).DeclaringType;
     }
     _log.DebugFormat("Found factory for {0} objects", ReturnType);
 }
コード例 #2
0
ファイル: Command.cs プロジェクト: agardiner/hfmcmd
 /// Constructor
 public Factory(MemberInfo mi, FactoryAttribute fa)
 {
     _memberInfo = mi;
     _factoryAttribute = fa;
     if(mi is MethodInfo) {
         ReturnType = (mi as MethodInfo).ReturnType;
     }
     else if(mi is PropertyInfo) {
         ReturnType = (mi as PropertyInfo).PropertyType;
     }
     else if(mi is ConstructorInfo) {
         ReturnType = (mi as ConstructorInfo).DeclaringType;
     }
     _log.DebugFormat("Found factory for {0} objects", ReturnType);
 }