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
- XPathNode.cs
- WrappedReader.cs
- ReflectionTypeLoadException.cs
- DataControlHelper.cs
- ParserExtension.cs
- GridViewColumn.cs
- TableLayoutStyleCollection.cs
- Type.cs
- GroupLabel.cs
- ScriptReferenceBase.cs
- AnnotationResourceChangedEventArgs.cs
- Pkcs7Signer.cs
- ExcCanonicalXml.cs
- FixedSOMPageElement.cs
- GeneralTransformGroup.cs
- ControlPersister.cs
- MenuBase.cs
- TabletDevice.cs
- ListViewItem.cs
- AttributeProviderAttribute.cs
- DataSourceListEditor.cs
- EdmSchemaError.cs
- OverrideMode.cs
- Accessors.cs
- DataBindingCollection.cs
- TreeIterator.cs
- BooleanConverter.cs
- ConfigurationStrings.cs
- OperationCanceledException.cs
- DeploymentSection.cs
- PatternMatcher.cs
- UMPAttributes.cs
- ObjRef.cs
- MenuScrollingVisibilityConverter.cs
- DataServices.cs
- PrimitiveXmlSerializers.cs
- InvalidateEvent.cs
- DependencyPropertyKind.cs
- GridEntryCollection.cs
- XmlAttributes.cs
- PackagePartCollection.cs
- OperationAbortedException.cs
- DocumentPageHost.cs
- ExtensionDataObject.cs
- TablePatternIdentifiers.cs
- PagesSection.cs
- RSAOAEPKeyExchangeFormatter.cs
- FamilyTypeface.cs
- UserControlCodeDomTreeGenerator.cs
- SQlBooleanStorage.cs
- ProbeMatchesMessage11.cs
- Semaphore.cs
- ColorInterpolationModeValidation.cs
- DynamicRendererThreadManager.cs
- HMACRIPEMD160.cs
- RegionData.cs
- TemplateGroupCollection.cs
- DllNotFoundException.cs
- TimeSpanConverter.cs
- ReceiveContext.cs
- ButtonBaseDesigner.cs
- HMACSHA1.cs
- DataRowView.cs
- SqlParameter.cs
- RoutedEventConverter.cs
- DataRowView.cs
- DataStreams.cs
- MemoryPressure.cs
- DataGridViewHeaderCell.cs
- Barrier.cs
- ProfilePropertySettingsCollection.cs
- HostingEnvironmentSection.cs
- RequestBringIntoViewEventArgs.cs
- SafeNativeMethodsMilCoreApi.cs
- MulticastOption.cs
- OutgoingWebResponseContext.cs
- DiscoveryClientBindingElement.cs
- FlowchartDesigner.Helpers.cs
- TreeViewImageKeyConverter.cs
- DocumentGridPage.cs
- DataTableClearEvent.cs
- DesignerDataSchemaClass.cs
- SmiEventStream.cs
- ExpandedWrapper.cs
- WindowsRichEditRange.cs
- TextHidden.cs
- UInt64Storage.cs
- NonBatchDirectoryCompiler.cs
- Lasso.cs
- CommentEmitter.cs
- PasswordRecovery.cs
- NeutralResourcesLanguageAttribute.cs
- WindowsImpersonationContext.cs
- UserPreferenceChangingEventArgs.cs
- XmlText.cs
- InstanceOwnerException.cs
- EntityClientCacheKey.cs
- PropertyItem.cs
- XmlNodeComparer.cs
- ObjectItemLoadingSessionData.cs