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
- figurelength.cs
- ParameterEditorUserControl.cs
- RoutingBehavior.cs
- SemaphoreSecurity.cs
- OutOfProcStateClientManager.cs
- XmlSchemaSimpleContentExtension.cs
- SqlDataSourceSummaryPanel.cs
- _LoggingObject.cs
- OptimizedTemplateContent.cs
- NullableBoolConverter.cs
- WebBrowserDocumentCompletedEventHandler.cs
- OracleLob.cs
- Dispatcher.cs
- connectionpool.cs
- TransactionChannel.cs
- OleDbEnumerator.cs
- MULTI_QI.cs
- ClientProxyGenerator.cs
- ObjectRef.cs
- XmlDownloadManager.cs
- LogSwitch.cs
- FileNotFoundException.cs
- ResourceAttributes.cs
- DispatcherOperation.cs
- BamlRecordWriter.cs
- ContextMenuStrip.cs
- DirtyTextRange.cs
- HashAlgorithm.cs
- WorkflowEnvironment.cs
- AnimationClockResource.cs
- _ShellExpression.cs
- AppLevelCompilationSectionCache.cs
- ShortcutKeysEditor.cs
- UIPermission.cs
- AlphabetConverter.cs
- PanelStyle.cs
- RegistrationServices.cs
- SignedXml.cs
- TemplatePartAttribute.cs
- PreProcessInputEventArgs.cs
- RangeContentEnumerator.cs
- DataBindingExpressionBuilder.cs
- StringOutput.cs
- EdmFunctions.cs
- ConstantSlot.cs
- AuthorizationRuleCollection.cs
- QueuedDeliveryRequirementsMode.cs
- WebBrowserBase.cs
- LexicalChunk.cs
- FontNamesConverter.cs
- ContentType.cs
- GroupBoxRenderer.cs
- FontSource.cs
- basenumberconverter.cs
- CustomErrorsSection.cs
- XmlSchemas.cs
- AssemblyAttributesGoHere.cs
- FormViewDeletedEventArgs.cs
- BinaryReader.cs
- CancelRequestedQuery.cs
- HttpHeaderCollection.cs
- ErrorHandlingAcceptor.cs
- SurrogateSelector.cs
- WindowHideOrCloseTracker.cs
- FormViewDeleteEventArgs.cs
- _CommandStream.cs
- ContentFileHelper.cs
- XNodeSchemaApplier.cs
- SelectionWordBreaker.cs
- OleDbPermission.cs
- ImageListImageEditor.cs
- DependencyPropertyConverter.cs
- TagPrefixCollection.cs
- HttpConfigurationContext.cs
- DataGridCaption.cs
- SessionSwitchEventArgs.cs
- ResXResourceWriter.cs
- DataGridViewBand.cs
- ShaperBuffers.cs
- ReadOnlyActivityGlyph.cs
- TypeSystem.cs
- Control.cs
- ProcessInfo.cs
- TargetInvocationException.cs
- SymmetricAlgorithm.cs
- CloudCollection.cs
- TraceRecord.cs
- MsmqIntegrationElement.cs
- FileDialog_Vista_Interop.cs
- RuntimeHelpers.cs
- PointCollectionConverter.cs
- XmlSchemaInfo.cs
- SqlResolver.cs
- HttpDebugHandler.cs
- StagingAreaInputItem.cs
- StylusDevice.cs
- SessionIDManager.cs
- SafeArrayRankMismatchException.cs
- ProfessionalColorTable.cs
- HtmlTextBoxAdapter.cs