System.ComponentModel.DebugTypeDescriptor.GetDefaultProperty C# (CSharp) Method

GetDefaultProperty() public static method

public static GetDefaultProperty ( object component, bool noCustomTypeDesc ) : PropertyDescriptor
component object
noCustomTypeDesc bool
return PropertyDescriptor
        public static PropertyDescriptor GetDefaultProperty(object component, bool noCustomTypeDesc) {
            if (component == null) {
                return null;
            }

            if (System.Runtime.InteropServices.Marshal.IsComObject(component)) {
            
                // Do not rip this varible -- it is here to make the get to 
                // this static variable thread-safe.
                //
#pragma warning disable 618
                IComNativeDescriptorHandler handler = comNativeDescriptorHandler;
#pragma warning restore 618                
                if (handler != null) {
                    return handler.GetDefaultProperty(component);
                }
                return null;
            }

            if (!noCustomTypeDesc && component is ICustomTypeDescriptor) {
                return((ICustomTypeDescriptor)component).GetDefaultProperty();
            }

            return GetEntry(component, component.GetType()).GetDefaultProperty(component);
        }

Same methods

DebugTypeDescriptor::GetDefaultProperty ( Type componentType ) : PropertyDescriptor
DebugTypeDescriptor::GetDefaultProperty ( object component ) : PropertyDescriptor