Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- XamlStream.cs
- NameValueConfigurationElement.cs
- RelatedImageListAttribute.cs
- SequenceRange.cs
- WebPartHeaderCloseVerb.cs
- WebPartEditorCancelVerb.cs
- ContentElement.cs
- DataSourceBooleanViewSchemaConverter.cs
- WebPartsSection.cs
- QilXmlWriter.cs
- PrinterUnitConvert.cs
- XmlAutoDetectWriter.cs
- handlecollector.cs
- DefaultShape.cs
- X509Chain.cs
- RadioButtonFlatAdapter.cs
- TextMarkerSource.cs
- HttpWebRequest.cs
- Metafile.cs
- SpStreamWrapper.cs
- HtmlInputReset.cs
- ItemAutomationPeer.cs
- ConfigXmlWhitespace.cs
- DbConnectionPoolIdentity.cs
- XamlRtfConverter.cs
- UnionExpr.cs
- QuerySelectOp.cs
- GZipUtils.cs
- SqlRewriteScalarSubqueries.cs
- TdsParserStateObject.cs
- StrokeFIndices.cs
- EmitterCache.cs
- OracleNumber.cs
- AnnouncementEndpointElement.cs
- FixedDocumentPaginator.cs
- ObjectHelper.cs
- ReaderOutput.cs
- PersonalizationState.cs
- TextTreeTextNode.cs
- DoubleLink.cs
- DataMemberAttribute.cs
- RegistryExceptionHelper.cs
- DecimalAnimation.cs
- PersistChildrenAttribute.cs
- ViewManager.cs
- Metafile.cs
- DrawingContext.cs
- ExtenderHelpers.cs
- KernelTypeValidation.cs
- OSFeature.cs
- WindowsMenu.cs
- ContainerSelectorGlyph.cs
- TagNameToTypeMapper.cs
- PageContentAsyncResult.cs
- TreeNode.cs
- ClassicBorderDecorator.cs
- Memoizer.cs
- InputProcessorProfilesLoader.cs
- FunctionDescription.cs
- ListControlConvertEventArgs.cs
- CodeAccessPermission.cs
- ClockController.cs
- StatusBarDrawItemEvent.cs
- M3DUtil.cs
- FormsAuthenticationModule.cs
- SafeProcessHandle.cs
- UnmanagedBitmapWrapper.cs
- UIElement.cs
- XmlJsonReader.cs
- PageDeviceFont.cs
- BrowserCapabilitiesCompiler.cs
- DesignerHost.cs
- MimeTypeMapper.cs
- OptimizedTemplateContentHelper.cs
- SafeHandles.cs
- MultiPartWriter.cs
- FixedSOMTableCell.cs
- elementinformation.cs
- ContextBase.cs
- DataGridViewColumnHeaderCell.cs
- CodeDirectoryCompiler.cs
- SystemInformation.cs
- AdornerHitTestResult.cs
- Debugger.cs
- QueryStringParameter.cs
- wgx_exports.cs
- RequestTimeoutManager.cs
- Margins.cs
- OleDbRowUpdatingEvent.cs
- EpmCustomContentWriterNodeData.cs
- FamilyCollection.cs
- EdmMember.cs
- AmbientEnvironment.cs
- PreservationFileReader.cs
- LOSFormatter.cs
- CompilerGeneratedAttribute.cs
- GridViewItemAutomationPeer.cs
- PropertyKey.cs
- HashStream.cs
- StringKeyFrameCollection.cs