Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Net / System / Net / Configuration / UriSection.cs / 4 / 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RequestSecurityTokenSerializer.cs
- InputElement.cs
- Misc.cs
- TripleDESCryptoServiceProvider.cs
- LocatorPart.cs
- StrongNameHelpers.cs
- DependentList.cs
- QilBinary.cs
- TableLayoutSettings.cs
- RequestNavigateEventArgs.cs
- RemoteWebConfigurationHost.cs
- AdornerHitTestResult.cs
- control.ime.cs
- UseAttributeSetsAction.cs
- IpcServerChannel.cs
- RandomNumberGenerator.cs
- TableLayoutRowStyleCollection.cs
- PageBorderless.cs
- UIElementPropertyUndoUnit.cs
- FragmentQuery.cs
- ChildrenQuery.cs
- PeerEndPoint.cs
- DataSourceCacheDurationConverter.cs
- UIElement3D.cs
- BigInt.cs
- Stack.cs
- CommentEmitter.cs
- SrgsElementFactory.cs
- PrivilegedConfigurationManager.cs
- XmlEventCache.cs
- QueueException.cs
- ArrangedElement.cs
- ResourceAttributes.cs
- Msec.cs
- InfiniteIntConverter.cs
- WaitingCursor.cs
- XmlCharCheckingReader.cs
- ReverseInheritProperty.cs
- CodeDomSerializer.cs
- ConfigDefinitionUpdates.cs
- FixedTextContainer.cs
- FileDialogPermission.cs
- OutKeywords.cs
- DependentList.cs
- CalendarData.cs
- ConstraintEnumerator.cs
- ProcessModuleCollection.cs
- EmptyStringExpandableObjectConverter.cs
- TransformProviderWrapper.cs
- HttpFileCollectionBase.cs
- FormViewPagerRow.cs
- InstancePersistenceEvent.cs
- DrawingContextWalker.cs
- DropTarget.cs
- MenuStrip.cs
- RemoteDebugger.cs
- safemediahandle.cs
- Screen.cs
- VirtualPath.cs
- ZipIOExtraField.cs
- SafeArrayRankMismatchException.cs
- SqlBuffer.cs
- FilePresentation.cs
- GroupStyle.cs
- DocumentApplicationState.cs
- BackoffTimeoutHelper.cs
- UpdateManifestForBrowserApplication.cs
- EncodingTable.cs
- VectorKeyFrameCollection.cs
- Header.cs
- ValueExpressions.cs
- CodeVariableReferenceExpression.cs
- _CookieModule.cs
- Padding.cs
- ParallelEnumerable.cs
- Setter.cs
- ProxyWebPartManager.cs
- RelationshipFixer.cs
- PinnedBufferMemoryStream.cs
- WebPartCollection.cs
- DataGridViewDataConnection.cs
- WmlTextViewAdapter.cs
- ChangeTracker.cs
- HttpListenerResponse.cs
- OrderedHashRepartitionEnumerator.cs
- BoundPropertyEntry.cs
- TransactionsSectionGroup.cs
- CodeDomLoader.cs
- EventArgs.cs
- SkinBuilder.cs
- SamlAuthorizationDecisionStatement.cs
- Size.cs
- PersonalizablePropertyEntry.cs
- BinHexDecoder.cs
- ListViewSelectEventArgs.cs
- ProxyGenerationError.cs
- ReadOnlyCollectionBase.cs
- AlgoModule.cs
- SoapInteropTypes.cs
- DetailsViewPagerRow.cs