public ReflectPropertyDescriptor(Type componentClass, string name, Type type,
Attribute[] attributes)
: base(name, attributes)
{
Debug.WriteLine($"Creating ReflectPropertyDescriptor for {componentClass?.FullName}.{name}");
try
{
if (type == null)
{
Debug.WriteLine("type == null, name == " + name);
throw new ArgumentException(string.Format(SR.ErrorInvalidPropertyType, name));
}
if (componentClass == null)
{
Debug.WriteLine("componentClass == null, name == " + name);
throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(componentClass)));
}
_type = type;
_componentClass = componentClass;
}
catch (Exception t)
{
Debug.Fail("Property '" + name + "' on component " + componentClass.FullName + " failed to init.");
Debug.Fail(t.ToString());
throw;
}
}