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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlInfoMessageEvent.cs
- ReturnEventArgs.cs
- CryptoKeySecurity.cs
- TagMapInfo.cs
- LOSFormatter.cs
- ConfigurationManagerInternalFactory.cs
- SiteMapPath.cs
- DataGrid.cs
- XmlSchemaSimpleContentRestriction.cs
- IisTraceWebEventProvider.cs
- AnnotationComponentManager.cs
- VideoDrawing.cs
- complextypematerializer.cs
- SupportedAddressingMode.cs
- QilStrConcat.cs
- ClientTarget.cs
- _SSPISessionCache.cs
- FixedSOMGroup.cs
- GridSplitter.cs
- HtmlString.cs
- AutoGeneratedFieldProperties.cs
- GeometryModel3D.cs
- MimeFormReflector.cs
- DataGridViewCell.cs
- DPTypeDescriptorContext.cs
- AttributeCollection.cs
- ModuleBuilder.cs
- JsonWriterDelegator.cs
- ViewStateModeByIdAttribute.cs
- IndexedSelectQueryOperator.cs
- MemberRestriction.cs
- XmlSchemaSet.cs
- InvokeCompletedEventArgs.cs
- SequentialUshortCollection.cs
- CacheSection.cs
- PropertyChangedEventManager.cs
- WindowsRichEditRange.cs
- DelegatingChannelListener.cs
- VirtualPathUtility.cs
- IntPtr.cs
- XmlAttributes.cs
- ExpressionParser.cs
- ListenerAdapterBase.cs
- StreamWithDictionary.cs
- TcpChannelListener.cs
- TransactionBridge.cs
- assemblycache.cs
- LinkClickEvent.cs
- FileRecordSequence.cs
- documentsequencetextpointer.cs
- Attributes.cs
- DescendantBaseQuery.cs
- WorkflowPrinting.cs
- DiscoveryDocument.cs
- mediaclock.cs
- ActivityExecutor.cs
- ThicknessAnimationBase.cs
- AnnotationHelper.cs
- ComponentResourceManager.cs
- TemplatePartAttribute.cs
- BitmapSizeOptions.cs
- ActivityExecutorOperation.cs
- DataGridViewCellStateChangedEventArgs.cs
- PanelStyle.cs
- IndicCharClassifier.cs
- DelayLoadType.cs
- CodeExpressionCollection.cs
- EventHandlersStore.cs
- ExternalDataExchangeClient.cs
- CoreSwitches.cs
- LowerCaseStringConverter.cs
- ConnectionStringsSection.cs
- DefaultPropertiesToSend.cs
- Sql8ExpressionRewriter.cs
- FlowLayout.cs
- GPRECT.cs
- IisTraceListener.cs
- LineServicesCallbacks.cs
- StyleConverter.cs
- PeerNameRegistration.cs
- XPathSelfQuery.cs
- WebPartAddingEventArgs.cs
- ModelProperty.cs
- BrushConverter.cs
- ServicePerformanceCounters.cs
- EraserBehavior.cs
- WebPartAddingEventArgs.cs
- LateBoundBitmapDecoder.cs
- TransactedBatchingElement.cs
- StrongNameIdentityPermission.cs
- TraceContextRecord.cs
- TableSectionStyle.cs
- SoapFault.cs
- RegionData.cs
- ReadContentAsBinaryHelper.cs
- Underline.cs
- MessageQueueAccessControlEntry.cs
- GenericsInstances.cs
- Vector3DValueSerializer.cs
- MemberInfoSerializationHolder.cs