Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Configuration / UriSection.cs / 1 / UriSection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Threading; ////// Summary description for UriSection. /// public sealed class UriSection : ConfigurationSection { public UriSection(){ this.properties.Add(this.idn); this.properties.Add(this.iriParsing); } [ConfigurationProperty(CommonConfigurationStrings.Idn)] public IdnElement Idn{ get { return (IdnElement)this[this.idn]; } } [ConfigurationProperty(CommonConfigurationStrings.IriParsing)] public IriParsingElement IriParsing { get{ return (IriParsingElement)this[this.iriParsing]; } } protected override ConfigurationPropertyCollection Properties { get{ return this.properties; } } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty idn = new ConfigurationProperty(CommonConfigurationStrings.Idn, typeof(IdnElement), null, ConfigurationPropertyOptions.None); readonly ConfigurationProperty iriParsing = new ConfigurationProperty(CommonConfigurationStrings.IriParsing, typeof(IriParsingElement), null, ConfigurationPropertyOptions.None); } internal sealed class UriSectionInternal { internal UriSectionInternal(UriSection section) { this.idn = section.Idn.Enabled; this.iriParsing = section.IriParsing.Enabled; } internal UriIdnScope Idn { get { return this.idn; } } internal bool IriParsing { get { return this.iriParsing; } } bool iriParsing; UriIdnScope idn; internal static object ClassSyncObject { get{ if (classSyncObject == null){ Interlocked.CompareExchange(ref classSyncObject, new object(), null); } return classSyncObject; } } internal static UriSectionInternal GetSection() { lock (ClassSyncObject){ UriSection section = PrivilegedConfigurationManager.GetSection(CommonConfigurationStrings.UriSectionPath) as UriSection; if (section == null) return null; return new UriSectionInternal(section); } } private static object classSyncObject; } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SessionStateModule.cs
- EntityModelBuildProvider.cs
- UIElementCollection.cs
- VirtualPathProvider.cs
- ListViewInsertionMark.cs
- Classification.cs
- DesignerDataRelationship.cs
- WebBrowsableAttribute.cs
- ComponentEditorPage.cs
- EdmToObjectNamespaceMap.cs
- ContentFileHelper.cs
- ListBase.cs
- TextEndOfLine.cs
- ExternalException.cs
- VoiceSynthesis.cs
- TextAnchor.cs
- AppDomainResourcePerfCounters.cs
- XmlHierarchicalDataSourceView.cs
- ContextQuery.cs
- InlinedAggregationOperator.cs
- QilList.cs
- ProcessThreadCollection.cs
- DataGridRelationshipRow.cs
- SynchronousReceiveElement.cs
- IndexedString.cs
- SqlExpressionNullability.cs
- WebPart.cs
- SequentialOutput.cs
- SignatureHelper.cs
- Select.cs
- WebPartConnectionsConfigureVerb.cs
- EpmContentSerializerBase.cs
- XmlSchemaImport.cs
- XmlName.cs
- PersonalizationProviderHelper.cs
- Encoding.cs
- LoginUtil.cs
- ConfigurationManagerHelper.cs
- LogSwitch.cs
- ConfigXmlDocument.cs
- Processor.cs
- HeaderedContentControl.cs
- MetafileHeaderEmf.cs
- EntityParameterCollection.cs
- UdpDiscoveryEndpoint.cs
- CreateUserErrorEventArgs.cs
- TextEncodedRawTextWriter.cs
- EmulateRecognizeCompletedEventArgs.cs
- datacache.cs
- EdmRelationshipRoleAttribute.cs
- PartialCachingControl.cs
- CodeCastExpression.cs
- IMembershipProvider.cs
- InputScopeConverter.cs
- CompressedStack.cs
- OleDbDataReader.cs
- XpsFilter.cs
- LayoutManager.cs
- DbCommandTree.cs
- returneventsaver.cs
- DataGridViewComboBoxEditingControl.cs
- DataTemplate.cs
- MetadataUtil.cs
- DashStyle.cs
- XPathDocument.cs
- LockRecursionException.cs
- DocumentSequence.cs
- Char.cs
- DrawingContextDrawingContextWalker.cs
- VScrollBar.cs
- Base64Decoder.cs
- SynchronizedDisposablePool.cs
- XmlConvert.cs
- MsmqReceiveParameters.cs
- RemotingConfigParser.cs
- NativeObjectSecurity.cs
- MulticastOption.cs
- ScriptManager.cs
- XmlElementList.cs
- Matrix3DConverter.cs
- AccessDataSource.cs
- PagerSettings.cs
- HotSpot.cs
- CredentialCache.cs
- AspProxy.cs
- TypeConverterValueSerializer.cs
- SmtpDateTime.cs
- CacheAxisQuery.cs
- ResourceBinder.cs
- Automation.cs
- HttpCookie.cs
- SchemaTypeEmitter.cs
- LineBreak.cs
- WindowShowOrOpenTracker.cs
- PermissionToken.cs
- ListViewItemEventArgs.cs
- ErrorActivity.cs
- oledbconnectionstring.cs
- SimpleWorkerRequest.cs
- HttpResponse.cs