System.ComponentModel.TypeDescriptor.AddAttributes C# (CSharp) Method

AddAttributes() private method

private AddAttributes ( object instance ) : TypeDescriptionProvider
instance object
return TypeDescriptionProvider
        public static TypeDescriptionProvider AddAttributes(object instance, params Attribute[] attributes)
        {
            if (instance == null)
            {
                throw new ArgumentNullException(nameof(instance));
            }

            if (attributes == null)
            {
                throw new ArgumentNullException(nameof(attributes));
            }

            TypeDescriptionProvider existingProvider = GetProvider(instance);
            TypeDescriptionProvider provider = new AttributeProvider(existingProvider, attributes);
            TypeDescriptor.AddProvider(provider, instance);
            return provider;
        }

Same methods

TypeDescriptor::AddAttributes ( Type type ) : TypeDescriptionProvider