Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Configuration / IdnElement.cs / 2 / IdnElement.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System; using System.Reflection; using System.ComponentModel; using System.Globalization; public sealed class IdnElement : ConfigurationElement { public IdnElement() { this.properties.Add(this.enabled); } protected override ConfigurationPropertyCollection Properties { get{ return this.properties; } } [ConfigurationProperty(CommonConfigurationStrings.Enabled, DefaultValue = (UriIdnScope)UriIdnScope.None)] public UriIdnScope Enabled { get { return (UriIdnScope)this[this.enabled]; } set { this[this.enabled] = value; } } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty enabled = new ConfigurationProperty(CommonConfigurationStrings.Enabled, typeof(UriIdnScope), UriIdnScope.None, new UriIdnScopeTypeConverter(), null, ConfigurationPropertyOptions.None); class UriIdnScopeTypeConverter : TypeConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)){ return true; } return base.CanConvertFrom(context, sourceType); } public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { string s = value as string; if (s != null){ s = s.ToLower(CultureInfo.InvariantCulture); switch (s){ case "all": return UriIdnScope.All; case "none": return UriIdnScope.None; case "allexceptintranet": return UriIdnScope.AllExceptIntranet; } } return base.ConvertFrom(context, culture, value); } } } }
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BatchWriter.cs
- ListBox.cs
- CrossAppDomainChannel.cs
- Oci.cs
- EntityProxyTypeInfo.cs
- BindingMAnagerBase.cs
- FloaterParaClient.cs
- DomainLiteralReader.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- designeractionbehavior.cs
- AggregateNode.cs
- CoTaskMemHandle.cs
- Vector.cs
- CustomValidator.cs
- TabControlCancelEvent.cs
- Stopwatch.cs
- ValueType.cs
- ContextQuery.cs
- FrameworkPropertyMetadata.cs
- autovalidator.cs
- Registry.cs
- StructuredTypeEmitter.cs
- QilUnary.cs
- ValidationException.cs
- XmlSchemaAttributeGroupRef.cs
- SourceFileBuildProvider.cs
- ReferenceSchema.cs
- ELinqQueryState.cs
- OleStrCAMarshaler.cs
- WebPartConnectionCollection.cs
- HandleCollector.cs
- ContentElement.cs
- CodeIdentifier.cs
- _NegoStream.cs
- AsymmetricSignatureDeformatter.cs
- ReadOnlyNameValueCollection.cs
- CustomAttributeFormatException.cs
- TrackPointCollection.cs
- TraceSection.cs
- QueryContinueDragEventArgs.cs
- WindowsGraphicsCacheManager.cs
- AccessedThroughPropertyAttribute.cs
- XhtmlTextWriter.cs
- GraphicsContainer.cs
- WebPartEditorOkVerb.cs
- TextTreeFixupNode.cs
- ForeignConstraint.cs
- Utils.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- ScriptIgnoreAttribute.cs
- FormatVersion.cs
- BamlStream.cs
- PointAnimationUsingKeyFrames.cs
- SQLInt16Storage.cs
- Sequence.cs
- DesignerOptionService.cs
- InternalsVisibleToAttribute.cs
- DataServiceQuery.cs
- SchemaImporterExtensionsSection.cs
- AnnotationResource.cs
- TimeoutHelper.cs
- XmlSchemaRedefine.cs
- StylusDownEventArgs.cs
- SqlSelectClauseBuilder.cs
- GenericAuthenticationEventArgs.cs
- Condition.cs
- XmlLoader.cs
- BasicBrowserDialog.designer.cs
- GridToolTip.cs
- AuthenticationConfig.cs
- ActivityBuilderHelper.cs
- StreamInfo.cs
- NavigationCommands.cs
- XmlTypeMapping.cs
- DataProtectionSecurityStateEncoder.cs
- SRGSCompiler.cs
- Grid.cs
- CheckBoxStandardAdapter.cs
- propertytag.cs
- MediaTimeline.cs
- XmlTypeAttribute.cs
- PageSettings.cs
- DatasetMethodGenerator.cs
- CodeExporter.cs
- ConfigurationStrings.cs
- SqlColumnizer.cs
- TemplateField.cs
- MethodInfo.cs
- DBConcurrencyException.cs
- Figure.cs
- MILUtilities.cs
- PeerName.cs
- XmlnsDictionary.cs
- DocumentCollection.cs
- ConstructorNeedsTagAttribute.cs
- securitycriticaldata.cs
- SmtpFailedRecipientException.cs
- AgileSafeNativeMemoryHandle.cs
- OleDbPermission.cs
- ShapingWorkspace.cs