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
- CatalogZone.cs
- CellTreeNodeVisitors.cs
- HtmlContainerControl.cs
- SqlTypesSchemaImporter.cs
- HtmlElementEventArgs.cs
- CombinedGeometry.cs
- returneventsaver.cs
- URLIdentityPermission.cs
- DiffuseMaterial.cs
- ProgressBarHighlightConverter.cs
- ClientOptions.cs
- HtmlSelect.cs
- PolicyException.cs
- WindowsPrincipal.cs
- TextBoxBaseDesigner.cs
- TextRangeEditLists.cs
- DesignerActionHeaderItem.cs
- OdbcCommandBuilder.cs
- MulticastOption.cs
- AsnEncodedData.cs
- WebServiceResponseDesigner.cs
- WindowsSolidBrush.cs
- XsltArgumentList.cs
- ReadOnlyDictionary.cs
- NamespaceEmitter.cs
- OleDbError.cs
- DynamicDataManager.cs
- DetailsView.cs
- FrameworkElement.cs
- ActivityExecutionContextCollection.cs
- HttpWebResponse.cs
- ResourceDescriptionAttribute.cs
- EdmMember.cs
- SoapHeaderAttribute.cs
- SqlStatistics.cs
- ToolboxItem.cs
- DataViewManagerListItemTypeDescriptor.cs
- SqlStream.cs
- prompt.cs
- CardSpaceException.cs
- regiisutil.cs
- IsolationInterop.cs
- ToolStripSettings.cs
- SettingsPropertyValue.cs
- WsatServiceCertificate.cs
- CommandBinding.cs
- LinqDataSourceEditData.cs
- ButtonStandardAdapter.cs
- __FastResourceComparer.cs
- SerializableReadOnlyDictionary.cs
- Attributes.cs
- HandlerFactoryCache.cs
- EventSetterHandlerConverter.cs
- XmlElementCollection.cs
- MenuItemCollection.cs
- PageAdapter.cs
- OleDbSchemaGuid.cs
- TemplatedWizardStep.cs
- ProfileSettingsCollection.cs
- MultipleViewProviderWrapper.cs
- StreamingContext.cs
- XmlDataImplementation.cs
- ControlUtil.cs
- DataGridViewCellMouseEventArgs.cs
- PageHandlerFactory.cs
- TextTreeTextNode.cs
- AQNBuilder.cs
- HexParser.cs
- TableRowCollection.cs
- TerminatorSinks.cs
- PingReply.cs
- DefaultObjectMappingItemCollection.cs
- Quack.cs
- NameValueCollection.cs
- XmlEncodedRawTextWriter.cs
- AddInBase.cs
- EmptyStringExpandableObjectConverter.cs
- ZipIOCentralDirectoryBlock.cs
- PaperSource.cs
- SqlCacheDependencyDatabaseCollection.cs
- CodeMemberProperty.cs
- Behavior.cs
- SerializationAttributes.cs
- TransformValueSerializer.cs
- IResourceProvider.cs
- uribuilder.cs
- HtmlTextArea.cs
- OutputWindow.cs
- QuaternionRotation3D.cs
- ResourceExpression.cs
- wmiprovider.cs
- NativeCppClassAttribute.cs
- ToggleProviderWrapper.cs
- HiddenField.cs
- StreamInfo.cs
- CanExecuteRoutedEventArgs.cs
- BaseTreeIterator.cs
- HwndSourceKeyboardInputSite.cs
- XmlSchemaAll.cs
- FixedSOMTextRun.cs