예제 #1
0
 public Constructor(Type typeToConstruct) :
     base(typeToConstruct, null)
 {
     ConstructorInfo = GetDefaultConstructor(typeToConstruct);
     if (ConstructorInfo == null)
     {
         ConstructorException.Raise(typeToConstruct);
     }
 }
예제 #2
0
        public Constructor(Type typeToConstruct, ParametersOverloads parameters, ConstructorOptions options = null) :
            base(typeToConstruct, null)
        {
            if (parameters == null)
            {
                ConstructorInfo = GetDefaultConstructor(typeToConstruct);
            }
            else
            {
                ConstructorInfo = GetBestConstructor(typeToConstruct, parameters, options);
            }

            if (ConstructorInfo == null)
            {
                ConstructorException.Raise(typeToConstruct);
            }
        }