public void register_provider_registers_provider() { TypeDescriptionProvider provider; DnsNameTypeDescriptionProvider.RegisterProvider(); provider = TypeDescriptor.GetProvider(typeof(DnsName)); Assert.IsNotNull(provider); Assert.IsInstanceOfType(typeof(DnsNameTypeDescriptionProvider), provider); }
public void get_descriptor_returns_custom_descriptor() { ICustomTypeDescriptor descriptor; DnsNameTypeDescriptionProvider.RegisterProvider(); descriptor = TypeDescriptor.GetProvider(typeof(DnsName)).GetTypeDescriptor(null); Assert.IsNotNull(descriptor); Assert.IsInstanceOfType(typeof(DnsNameCustomTypeDescriptor), descriptor); }
/// <summary> /// Type initialiser for DnsResolverSection. /// </summary> static DnsResolverSection() { DnsNameTypeDescriptionProvider.RegisterProvider(); RuntimeTypeTypeDescriptionProvider.RegisterProvider(); }
public void register_provider_is_safe_to_call_multiple_times() { DnsNameTypeDescriptionProvider.RegisterProvider(); }