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
- WindowsButton.cs
- StyleSheetComponentEditor.cs
- UriScheme.cs
- ContentDefinition.cs
- RegexWorker.cs
- GeneratedContractType.cs
- ColorInterpolationModeValidation.cs
- XmlSchemaComplexContentRestriction.cs
- SHA1.cs
- HyperLink.cs
- PictureBox.cs
- EnvironmentPermission.cs
- ProgressBarHighlightConverter.cs
- FirewallWrapper.cs
- ListView.cs
- CodeTryCatchFinallyStatement.cs
- ToolBarPanel.cs
- InfoCardCryptoHelper.cs
- ProvidePropertyAttribute.cs
- CombinedGeometry.cs
- InterleavedZipPartStream.cs
- HttpDictionary.cs
- Membership.cs
- NotifyCollectionChangedEventArgs.cs
- InputEventArgs.cs
- ArithmeticException.cs
- QilNode.cs
- ContainerUtilities.cs
- AssemblyCache.cs
- TypeUnloadedException.cs
- ResolveCriteriaCD1.cs
- DesignerSerializerAttribute.cs
- ToolStripDropDownMenu.cs
- FixedHighlight.cs
- ListViewInsertionMark.cs
- UnsafePeerToPeerMethods.cs
- WebExceptionStatus.cs
- MDIWindowDialog.cs
- SessionPageStatePersister.cs
- FileAuthorizationModule.cs
- DataColumnCollection.cs
- WebPartEditVerb.cs
- AutoCompleteStringCollection.cs
- propertyentry.cs
- StrongNameKeyPair.cs
- X509SecurityTokenAuthenticator.cs
- ViewStateChangedEventArgs.cs
- ConfigurationManagerHelper.cs
- CheckBox.cs
- AtomServiceDocumentSerializer.cs
- FormatException.cs
- XomlDesignerLoader.cs
- FixedPage.cs
- SymLanguageVendor.cs
- PropertyEmitter.cs
- WindowsTreeView.cs
- sqlser.cs
- UpDownEvent.cs
- FeatureSupport.cs
- ContactManager.cs
- CellIdBoolean.cs
- ThreadAttributes.cs
- PackUriHelper.cs
- DataGridTextBox.cs
- DataColumnPropertyDescriptor.cs
- WmpBitmapDecoder.cs
- PictureBoxDesigner.cs
- FormsIdentity.cs
- EFDataModelProvider.cs
- XmlSchemaComplexType.cs
- Group.cs
- CompleteWizardStep.cs
- DecoderNLS.cs
- ReadOnlyDataSourceView.cs
- DataStorage.cs
- XmlTextReaderImpl.cs
- DataControlButton.cs
- log.cs
- CodeTypeMember.cs
- ToolTip.cs
- TrimSurroundingWhitespaceAttribute.cs
- RegexTypeEditor.cs
- SerializableTypeCodeDomSerializer.cs
- PersistenceMetadataNamespace.cs
- VirtualDirectoryMapping.cs
- XmlRawWriterWrapper.cs
- ComponentChangingEvent.cs
- SecurityKeyIdentifierClause.cs
- TextDecorationCollection.cs
- sqlpipe.cs
- CurrentChangingEventArgs.cs
- CompModSwitches.cs
- DatePickerDateValidationErrorEventArgs.cs
- GenericIdentity.cs
- MobilePage.cs
- Parser.cs
- XamlVector3DCollectionSerializer.cs
- WebPartConnectionsConnectVerb.cs
- Filter.cs
- WasNotInstalledException.cs