Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CapabilitiesPattern.cs
- ServiceNotStartedException.cs
- SrgsOneOf.cs
- OutputCacheProfileCollection.cs
- ClientSection.cs
- SplayTreeNode.cs
- ACL.cs
- TemporaryBitmapFile.cs
- DataSvcMapFile.cs
- SymLanguageVendor.cs
- MobileUserControl.cs
- M3DUtil.cs
- InstanceDataCollection.cs
- SafeReversePInvokeHandle.cs
- OverlappedAsyncResult.cs
- ReaderOutput.cs
- ScriptingScriptResourceHandlerSection.cs
- SystemBrushes.cs
- PartialList.cs
- CodeAccessSecurityEngine.cs
- HtmlSelect.cs
- ImageDrawing.cs
- X509CertificateChain.cs
- SmtpReplyReader.cs
- DataSourceSelectArguments.cs
- EventLogQuery.cs
- Soap.cs
- SHA512.cs
- Journal.cs
- ServiceRoute.cs
- SecurityKeyIdentifier.cs
- DataGridToolTip.cs
- Run.cs
- StorageEntitySetMapping.cs
- Range.cs
- XmlDataFileEditor.cs
- SelectionItemPattern.cs
- FontStretches.cs
- SystemResourceHost.cs
- XmlExpressionDumper.cs
- FilteredXmlReader.cs
- ExpressionDumper.cs
- KnownBoxes.cs
- BaseCAMarshaler.cs
- DrawingAttributes.cs
- WindowsEditBox.cs
- AlignmentXValidation.cs
- streamingZipPartStream.cs
- WebPartEditorCancelVerb.cs
- CollectionChangedEventManager.cs
- LineInfo.cs
- DataServiceHostFactory.cs
- GeometryGroup.cs
- EventProvider.cs
- DrawingBrush.cs
- ObjectStateManager.cs
- XmlNodeComparer.cs
- ModelUIElement3D.cs
- HostingEnvironment.cs
- Marshal.cs
- BuildProvider.cs
- TypeSystem.cs
- CategoryValueConverter.cs
- ImageIndexConverter.cs
- ObjectToken.cs
- ContentElement.cs
- ConnectionStringsSection.cs
- DeviceContext2.cs
- SQLInt32Storage.cs
- DefaultTraceListener.cs
- XmlDeclaration.cs
- AssemblyAssociatedContentFileAttribute.cs
- StreamWriter.cs
- AuthenticationManager.cs
- ExtendedPropertyDescriptor.cs
- FormViewUpdateEventArgs.cs
- EventDescriptor.cs
- BuildDependencySet.cs
- XamlSerializer.cs
- HitTestDrawingContextWalker.cs
- FilterableAttribute.cs
- SystemDiagnosticsSection.cs
- SecurityState.cs
- ToolStripOverflowButton.cs
- AssemblyAttributes.cs
- ButtonRenderer.cs
- CodeTypeReferenceCollection.cs
- FusionWrap.cs
- TableLayoutColumnStyleCollection.cs
- DefaultPropertyAttribute.cs
- XmlWhitespace.cs
- SchemaTableColumn.cs
- VisualTransition.cs
- Control.cs
- SqlDuplicator.cs
- ByteStreamMessage.cs
- HtmlMeta.cs
- NumberFormatter.cs
- TextEditorSelection.cs
- SerialErrors.cs