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
- Profiler.cs
- Processor.cs
- ManagementObject.cs
- EventlogProvider.cs
- DtrList.cs
- AuthenticationModulesSection.cs
- CodeCompileUnit.cs
- HitTestFilterBehavior.cs
- DebugView.cs
- SqlTopReducer.cs
- HandledMouseEvent.cs
- NodeFunctions.cs
- HybridDictionary.cs
- EntityContainer.cs
- Config.cs
- XmlnsDictionary.cs
- ObjectListTitleAttribute.cs
- DataGridViewColumnCollectionDialog.cs
- CompensationTokenData.cs
- HttpWriter.cs
- LowerCaseStringConverter.cs
- SQLSingleStorage.cs
- sqlser.cs
- XmlAttributes.cs
- DataGridViewControlCollection.cs
- StatusBarItemAutomationPeer.cs
- WebMessageFormatHelper.cs
- EncryptedReference.cs
- Vector.cs
- SqlInternalConnectionSmi.cs
- CallId.cs
- TextTreeInsertElementUndoUnit.cs
- SecurityAccessDeniedException.cs
- InvalidPrinterException.cs
- BooleanExpr.cs
- rsa.cs
- SqlPersistenceProviderFactory.cs
- Message.cs
- FreezableDefaultValueFactory.cs
- WebBrowserHelper.cs
- TripleDESCryptoServiceProvider.cs
- SectionUpdates.cs
- CodeIdentifiers.cs
- DesignerHost.cs
- OracleInfoMessageEventArgs.cs
- AlphabetConverter.cs
- StickyNoteContentControl.cs
- ErrorTableItemStyle.cs
- StyleCollectionEditor.cs
- CommonProperties.cs
- ActivityBuilder.cs
- ListViewItem.cs
- Pen.cs
- TraceAsyncResult.cs
- ResourceKey.cs
- ConnectionManagementElement.cs
- MenuEventArgs.cs
- PropertyInformationCollection.cs
- DataBoundLiteralControl.cs
- PersonalizationAdministration.cs
- ObjectListFieldsPage.cs
- CompilerError.cs
- WMIGenerator.cs
- RelatedCurrencyManager.cs
- XmlWriterSettings.cs
- ApplicationException.cs
- InternalConfigRoot.cs
- CmsUtils.cs
- SessionStateSection.cs
- Fx.cs
- PathSegmentCollection.cs
- ContentType.cs
- sqlpipe.cs
- MarshalByValueComponent.cs
- InvokePatternIdentifiers.cs
- XPathDocumentBuilder.cs
- ACL.cs
- SoapIgnoreAttribute.cs
- MessageSecurityOverMsmqElement.cs
- WebPartConnectionsCancelVerb.cs
- PolicyValidationException.cs
- XmlSchemaObjectCollection.cs
- Matrix3D.cs
- SoapReflectionImporter.cs
- WindowsImpersonationContext.cs
- CodeTypeReferenceCollection.cs
- SystemNetHelpers.cs
- CloseCryptoHandleRequest.cs
- TextElementEnumerator.cs
- Filter.cs
- CatalogPartChrome.cs
- CachingHintValidation.cs
- HtmlToClrEventProxy.cs
- SizeValueSerializer.cs
- RemoteWebConfigurationHost.cs
- ObjRef.cs
- CodeArgumentReferenceExpression.cs
- EnumerableRowCollection.cs
- BooleanExpr.cs
- WindowsAuthenticationEventArgs.cs