Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Configuration / System / Configuration / ProtectedConfiguration.cs / 1 / ProtectedConfiguration.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Collections; using System.Collections.Specialized; using System.Runtime.Serialization; using System.Configuration.Provider; using System.Xml; using System.Security.Permissions; [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] public static class ProtectedConfiguration { public static ProtectedConfigurationProviderCollection Providers { get { ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config == null) return new ProtectedConfigurationProviderCollection(); return config.GetAllProviders(); } } public const string RsaProviderName = "RsaProtectedConfigurationProvider"; public const string DataProtectionProviderName = "DataProtectionConfigurationProvider"; public const string ProtectedDataSectionName = BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION; public static string DefaultProvider { get { ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config != null) return config.DefaultProvider; return ""; } } /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// #if CACHE_PROVIDERS_IN_STATIC private static void InstantiateProviders() { if (_Providers != null) return; lock (_Lock) { if (_Providers != null) return; ProtectedConfigurationProviderCollection providers = new ProtectedConfigurationProviderCollection(); ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config != null) { foreach (DictionaryEntry de in config.ProviderNodes) { ProviderNode pn = de.Value as ProviderNode; if (pn == null) continue; providers.Add(pn.Provider); } } _Providers = providers; } } private static object _Lock = new object(); private static ProtectedConfigurationProviderCollection _Providers = null; #endif } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Collections; using System.Collections.Specialized; using System.Runtime.Serialization; using System.Configuration.Provider; using System.Xml; using System.Security.Permissions; [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] public static class ProtectedConfiguration { public static ProtectedConfigurationProviderCollection Providers { get { ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config == null) return new ProtectedConfigurationProviderCollection(); return config.GetAllProviders(); } } public const string RsaProviderName = "RsaProtectedConfigurationProvider"; public const string DataProtectionProviderName = "DataProtectionConfigurationProvider"; public const string ProtectedDataSectionName = BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION; public static string DefaultProvider { get { ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config != null) return config.DefaultProvider; return ""; } } /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// #if CACHE_PROVIDERS_IN_STATIC private static void InstantiateProviders() { if (_Providers != null) return; lock (_Lock) { if (_Providers != null) return; ProtectedConfigurationProviderCollection providers = new ProtectedConfigurationProviderCollection(); ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config != null) { foreach (DictionaryEntry de in config.ProviderNodes) { ProviderNode pn = de.Value as ProviderNode; if (pn == null) continue; providers.Add(pn.Provider); } } _Providers = providers; } } private static object _Lock = new object(); private static ProtectedConfigurationProviderCollection _Providers = null; #endif } } // 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
- TableLayoutPanelResizeGlyph.cs
- BmpBitmapDecoder.cs
- GridViewCommandEventArgs.cs
- DataSourceView.cs
- EasingKeyFrames.cs
- ISessionStateStore.cs
- Decimal.cs
- AspNetSynchronizationContext.cs
- SchemaElementLookUpTable.cs
- MissingSatelliteAssemblyException.cs
- XXXOnTypeBuilderInstantiation.cs
- NamespaceCollection.cs
- NavigatingCancelEventArgs.cs
- FilterableAttribute.cs
- contentDescriptor.cs
- RegisterInfo.cs
- ProcessModelInfo.cs
- dataSvcMapFileLoader.cs
- RequestCacheEntry.cs
- XmlBindingWorker.cs
- AssemblyName.cs
- WebControlsSection.cs
- DateTimeFormatInfoScanner.cs
- DelegatingHeader.cs
- FontUnit.cs
- OperationResponse.cs
- CounterCreationData.cs
- CqlErrorHelper.cs
- InternalConfigConfigurationFactory.cs
- KeyConverter.cs
- ScriptResourceMapping.cs
- DataSourceView.cs
- CollectionViewProxy.cs
- KeyGestureValueSerializer.cs
- BrushMappingModeValidation.cs
- InputScopeManager.cs
- GeneralTransform2DTo3D.cs
- DependencyObjectProvider.cs
- StoryFragments.cs
- PeerNameRecordCollection.cs
- TableLayoutSettings.cs
- ExpandCollapsePattern.cs
- StatusBarPanel.cs
- Byte.cs
- CryptographicAttribute.cs
- NameTable.cs
- ExtenderProvidedPropertyAttribute.cs
- AssemblyCache.cs
- HandlerBase.cs
- AddInControllerImpl.cs
- SessionEndingEventArgs.cs
- Certificate.cs
- ResXDataNode.cs
- PageThemeCodeDomTreeGenerator.cs
- TextElementCollectionHelper.cs
- VScrollBar.cs
- MimeBasePart.cs
- ToolStripItemImageRenderEventArgs.cs
- SequentialUshortCollection.cs
- cookie.cs
- XmlUrlResolver.cs
- SoapExtensionTypeElementCollection.cs
- DesignerAutoFormatStyle.cs
- XmlIgnoreAttribute.cs
- ContractHandle.cs
- Msmq3PoisonHandler.cs
- TextTreeExtractElementUndoUnit.cs
- RenderDataDrawingContext.cs
- SafeEventHandle.cs
- WsatServiceAddress.cs
- CompilerGeneratedAttribute.cs
- recordstatescratchpad.cs
- CheckBoxFlatAdapter.cs
- SimpleTextLine.cs
- RijndaelManaged.cs
- ValidatingCollection.cs
- DataGridViewCellValidatingEventArgs.cs
- TimerElapsedEvenArgs.cs
- SHA384CryptoServiceProvider.cs
- DataGridViewRowCancelEventArgs.cs
- SimpleHandlerFactory.cs
- UrlAuthFailureHandler.cs
- DependencyPropertyKind.cs
- DictionaryGlobals.cs
- Container.cs
- DataGridViewLinkCell.cs
- SqlStatistics.cs
- XmlSchemaSet.cs
- SqlDataRecord.cs
- EntityProviderFactory.cs
- FtpWebRequest.cs
- SynchronizationFilter.cs
- DbProviderFactoriesConfigurationHandler.cs
- TraceContext.cs
- TrustManager.cs
- RubberbandSelector.cs
- DesignerActionKeyboardBehavior.cs
- DetailsViewPagerRow.cs
- TextPenaltyModule.cs
- AsyncContentLoadedEventArgs.cs