public DebugReflectPropertyDescriptor(Type componentClass, string name, Type type,
Attribute[] attributes)
: base(name, attributes) {
Debug.WriteLineIf(PropDescCreateSwitch.TraceVerbose, "Creating DebugReflectPropertyDescriptor for " + componentClass.FullName + "." + name);
try {
if (type == null) {
Debug.WriteLineIf(PropDescCreateSwitch.TraceVerbose, "type == null, name == " + name);
throw new ArgumentException(SR.GetString(SR.ErrorInvalidPropertyType, name));
}
if (componentClass == null) {
Debug.WriteLineIf(PropDescCreateSwitch.TraceVerbose, "componentClass == null, name == " + name);
throw new ArgumentException(SR.GetString(SR.InvalidNullArgument, "componentClass"));
}
this.type = type;
this.componentClass = componentClass;
}
catch (Exception t) {
Debug.Fail("Property '" + name + "' on component " + componentClass.FullName + " failed to init.");
Debug.Fail(t.ToString());
throw t;
}
catch {
throw;
}
}