Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ProtectedConfiguration.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TablePattern.cs
- TemplateApplicationHelper.cs
- ValidatorCompatibilityHelper.cs
- Material.cs
- HwndSubclass.cs
- WebBrowserHelper.cs
- WebPartPersonalization.cs
- ISFTagAndGuidCache.cs
- PathGradientBrush.cs
- SettingsProperty.cs
- ClientTargetCollection.cs
- TextPatternIdentifiers.cs
- DiffuseMaterial.cs
- AxisAngleRotation3D.cs
- DataGridViewMethods.cs
- UnmanagedBitmapWrapper.cs
- MouseButton.cs
- AnnouncementService.cs
- OdbcHandle.cs
- SplineQuaternionKeyFrame.cs
- BaseParagraph.cs
- CodeAttributeArgument.cs
- ConditionedDesigner.cs
- ServiceMetadataExtension.cs
- ImageButton.cs
- SerializationSectionGroup.cs
- KeyInstance.cs
- BinaryWriter.cs
- NullEntityWrapper.cs
- PersistChildrenAttribute.cs
- Int32CollectionConverter.cs
- TimeoutValidationAttribute.cs
- DesignerAdRotatorAdapter.cs
- SoapReflectionImporter.cs
- RegexInterpreter.cs
- TextDecoration.cs
- WebPartHeaderCloseVerb.cs
- DispatcherExceptionEventArgs.cs
- WebBrowserContainer.cs
- Pkcs9Attribute.cs
- RequestNavigateEventArgs.cs
- UriScheme.cs
- AssemblyName.cs
- WhitespaceReader.cs
- DrawingContextDrawingContextWalker.cs
- UriParserTemplates.cs
- Native.cs
- EventLogEntryCollection.cs
- SubtreeProcessor.cs
- StateDesigner.Layouts.cs
- BinaryCommonClasses.cs
- loginstatus.cs
- EncryptedKeyIdentifierClause.cs
- NetStream.cs
- PagesChangedEventArgs.cs
- TemplateNodeContextMenu.cs
- BaseResourcesBuildProvider.cs
- XPathExpr.cs
- dataSvcMapFileLoader.cs
- ProxyManager.cs
- RoleManagerEventArgs.cs
- NotifyCollectionChangedEventArgs.cs
- ArrangedElementCollection.cs
- ViewValidator.cs
- SafeRightsManagementQueryHandle.cs
- FormViewRow.cs
- SQLGuid.cs
- MatrixValueSerializer.cs
- smtppermission.cs
- DeclaredTypeValidatorAttribute.cs
- HotSpotCollection.cs
- UserControlCodeDomTreeGenerator.cs
- MbpInfo.cs
- DataPagerFieldCommandEventArgs.cs
- EntitySetBase.cs
- EncoderParameters.cs
- HashSetDebugView.cs
- BaseInfoTable.cs
- MenuItem.cs
- DesignerActionUIService.cs
- Calendar.cs
- Separator.cs
- PerformanceCountersBase.cs
- SecondaryViewProvider.cs
- StorageFunctionMapping.cs
- BaseContextMenu.cs
- DateTimePickerDesigner.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- LinearGradientBrush.cs
- MetadataItemCollectionFactory.cs
- CodeTypeMemberCollection.cs
- DispatcherExceptionEventArgs.cs
- ObjectItemCollection.cs
- DataPointer.cs
- NameValuePermission.cs
- FixedSOMTextRun.cs
- ComplexLine.cs
- FilterQuery.cs
- SystemBrushes.cs
- OracleDataAdapter.cs