Inheritance: System.Attribute
Ejemplo n.º 1
0
 /// 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);
 }
Ejemplo n.º 2
0
 /// 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);
 }