Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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; } } // 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
- TouchesOverProperty.cs
- DataControlButton.cs
- UnaryNode.cs
- SpeechAudioFormatInfo.cs
- OnOperation.cs
- VSWCFServiceContractGenerator.cs
- HtmlUtf8RawTextWriter.cs
- SmtpNetworkElement.cs
- PageCatalogPart.cs
- ComEventsSink.cs
- XmlMembersMapping.cs
- DataColumnMappingCollection.cs
- Byte.cs
- NativeMethods.cs
- shaperfactoryquerycachekey.cs
- DefinitionBase.cs
- ACE.cs
- Header.cs
- GuidConverter.cs
- DataGridParentRows.cs
- TrackingProfileDeserializationException.cs
- DataGridViewCellEventArgs.cs
- EUCJPEncoding.cs
- ImageSource.cs
- DesignDataSource.cs
- SafeNativeMethods.cs
- PartManifestEntry.cs
- DisposableCollectionWrapper.cs
- QueryCacheManager.cs
- InkSerializer.cs
- NodeFunctions.cs
- VirtualizingStackPanel.cs
- TemplateInstanceAttribute.cs
- DictionaryItemsCollection.cs
- ToolStripRenderer.cs
- Console.cs
- DragDropManager.cs
- SourceExpressionException.cs
- X509SecurityTokenAuthenticator.cs
- SqlReorderer.cs
- SchemaNotation.cs
- GeneralTransform3D.cs
- MethodCallTranslator.cs
- ListViewGroupItemCollection.cs
- DateTimeValueSerializer.cs
- AnnotationStore.cs
- CompilerScope.Storage.cs
- PathSegmentCollection.cs
- PerformanceCounterCategory.cs
- MachineKeySection.cs
- Vector3D.cs
- ToolBarOverflowPanel.cs
- RelationshipManager.cs
- ResourceDefaultValueAttribute.cs
- RegionInfo.cs
- BaseTemplateParser.cs
- MetadataArtifactLoaderFile.cs
- IndentedWriter.cs
- GridItem.cs
- Error.cs
- XmlnsDictionary.cs
- EntityChangedParams.cs
- CodePrimitiveExpression.cs
- XamlPointCollectionSerializer.cs
- TextSelectionHighlightLayer.cs
- safePerfProviderHandle.cs
- CustomSignedXml.cs
- SerialPinChanges.cs
- ReverseQueryOperator.cs
- SqlOuterApplyReducer.cs
- PrimitiveRenderer.cs
- Matrix3DValueSerializer.cs
- XmlSerializerSection.cs
- ADMembershipProvider.cs
- ParentControlDesigner.cs
- Debugger.cs
- HttpCookiesSection.cs
- AuthenticationServiceManager.cs
- EntityDataSourceWrapperCollection.cs
- EventArgs.cs
- TreeViewImageGenerator.cs
- BuildProvidersCompiler.cs
- FixedBufferAttribute.cs
- entityreference_tresulttype.cs
- TransformedBitmap.cs
- KnownBoxes.cs
- DataListItem.cs
- TreeViewHitTestInfo.cs
- CombinedGeometry.cs
- SecurityPolicySection.cs
- UIntPtr.cs
- XPathConvert.cs
- ConcurrentDictionary.cs
- GraphicsContext.cs
- BaseCodeDomTreeGenerator.cs
- SmiMetaDataProperty.cs
- Vector3DCollectionValueSerializer.cs
- StylusTouchDevice.cs
- EntitySetRetriever.cs
- Double.cs