コード例 #1
0
        public void register_provider_registers_provider()
        {
            TypeDescriptionProvider provider;

            DnsNameTypeDescriptionProvider.RegisterProvider();
            provider = TypeDescriptor.GetProvider(typeof(DnsName));
            Assert.IsNotNull(provider);
            Assert.IsInstanceOfType(typeof(DnsNameTypeDescriptionProvider), provider);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 /// <summary>
 /// Type initialiser for DnsResolverSection.
 /// </summary>
 static DnsResolverSection()
 {
     DnsNameTypeDescriptionProvider.RegisterProvider();
     RuntimeTypeTypeDescriptionProvider.RegisterProvider();
 }
コード例 #4
0
 public void register_provider_is_safe_to_call_multiple_times()
 {
     DnsNameTypeDescriptionProvider.RegisterProvider();
 }