System.ComponentModel.TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor.ICustomTypeDescriptor C# (CSharp) Method

ICustomTypeDescriptor() private method

ICustomTypeDescriptor implementation.
private ICustomTypeDescriptor ( Type editorBaseType ) : object
editorBaseType System.Type
return object
                object ICustomTypeDescriptor.GetEditor(Type editorBaseType)
                {
                    if (editorBaseType == null)
                    {
                        throw new ArgumentNullException(nameof(editorBaseType));
                    }

                    // Check to see if the provider we get is a ReflectTypeDescriptionProvider.
                    // If so, we can call on it directly rather than creating another
                    // custom type descriptor

                    TypeDescriptionProvider p = _node.Provider;
                    ReflectTypeDescriptionProvider rp = p as ReflectTypeDescriptionProvider;

                    if (rp != null)
                    {
                        return rp.GetExtendedEditor(_instance, editorBaseType);
                    }

                    ICustomTypeDescriptor desc = p.GetExtendedTypeDescriptor(_instance);
                    if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor"));
                    return desc.GetEditor(editorBaseType);
                }

Same methods

TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor::ICustomTypeDescriptor ( ) : AttributeCollection
TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor::ICustomTypeDescriptor ( ) : System.ComponentModel.EventDescriptor
TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor::ICustomTypeDescriptor ( ) : EventDescriptorCollection
TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor::ICustomTypeDescriptor ( Attribute attributes ) : EventDescriptorCollection
TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor::ICustomTypeDescriptor ( ) : PropertyDescriptor
TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor::ICustomTypeDescriptor ( ) : PropertyDescriptorCollection
TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor::ICustomTypeDescriptor ( Attribute attributes ) : PropertyDescriptorCollection
TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor::ICustomTypeDescriptor ( ) : TypeConverter
TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor::ICustomTypeDescriptor ( PropertyDescriptor pd ) : object
TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor::ICustomTypeDescriptor ( ) : string
TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor