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
- ProxyRpc.cs
- DockingAttribute.cs
- PersonalizationEntry.cs
- StateInitializationDesigner.cs
- DataBindingHandlerAttribute.cs
- HandlerBase.cs
- CompilationUnit.cs
- OleDbParameter.cs
- SharedStatics.cs
- CharEntityEncoderFallback.cs
- clipboard.cs
- BuildProvidersCompiler.cs
- ContentValidator.cs
- PageHandlerFactory.cs
- UpdateTranslator.cs
- WindowsEditBox.cs
- ContextActivityUtils.cs
- PropertyPath.cs
- DataGridItemAttachedStorage.cs
- HttpsTransportBindingElement.cs
- DataSourceCacheDurationConverter.cs
- __Error.cs
- WebPartRestoreVerb.cs
- DataGridViewImageColumn.cs
- DecoderExceptionFallback.cs
- TabletDevice.cs
- InvokePatternIdentifiers.cs
- GeometryCollection.cs
- OracleDateTime.cs
- HttpRuntimeSection.cs
- CommandConverter.cs
- ObjectListFieldsPage.cs
- login.cs
- Interlocked.cs
- CodeVariableReferenceExpression.cs
- PrinterResolution.cs
- Rethrow.cs
- FirewallWrapper.cs
- MemberAssignment.cs
- PasswordBoxAutomationPeer.cs
- GcHandle.cs
- ListViewHitTestInfo.cs
- Invariant.cs
- HtmlInputText.cs
- CookielessHelper.cs
- CodeSnippetExpression.cs
- AliasGenerator.cs
- WebResponse.cs
- PreservationFileReader.cs
- HandlerBase.cs
- CommandValueSerializer.cs
- EdmToObjectNamespaceMap.cs
- ErrorInfoXmlDocument.cs
- JsonReaderDelegator.cs
- CodeTypeParameterCollection.cs
- SqlStatistics.cs
- CachingHintValidation.cs
- Int16AnimationBase.cs
- Exceptions.cs
- CheckBoxPopupAdapter.cs
- RequestCachePolicyConverter.cs
- BitmapCacheBrush.cs
- SiteMap.cs
- HtmlTernaryTree.cs
- MemberAccessException.cs
- TextAction.cs
- HitTestWithPointDrawingContextWalker.cs
- FixedSOMGroup.cs
- ConstrainedDataObject.cs
- VisualStyleTypesAndProperties.cs
- PrinterUnitConvert.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- WebServicesDescriptionAttribute.cs
- ComponentChangedEvent.cs
- RecommendedAsConfigurableAttribute.cs
- ToolBarButtonClickEvent.cs
- TextHintingModeValidation.cs
- ModelPerspective.cs
- StylusPointPropertyInfoDefaults.cs
- RtType.cs
- ProtectedConfigurationProviderCollection.cs
- HelloOperation11AsyncResult.cs
- NativeMethods.cs
- CodeStatementCollection.cs
- LookupNode.cs
- unsafenativemethodsother.cs
- ActionItem.cs
- HyperLinkField.cs
- CommandEventArgs.cs
- dtdvalidator.cs
- AgileSafeNativeMemoryHandle.cs
- BamlRecordWriter.cs
- Evidence.cs
- DataRowView.cs
- DeclarativeCatalogPart.cs
- Variant.cs
- PageContent.cs
- SoapRpcMethodAttribute.cs
- SoapElementAttribute.cs
- ObjectDataSourceEventArgs.cs