Exemplo n.º 1
0
 public Constructor(Type typeToConstruct) :
     base(typeToConstruct, null)
 {
     ConstructorInfo = GetDefaultConstructor(typeToConstruct);
     if (ConstructorInfo == null)
     {
         ConstructorException.Raise(typeToConstruct);
     }
 }
Exemplo n.º 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);
            }
        }