Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Security / Util / Config.cs / 3 / Config.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // Config.cs // namespace System.Security.Util { using System; using System.Security.Util; using System.Security.Policy; using System.Security.Permissions; using System.Collections; using System.IO; using System.Reflection; using System.Globalization; using System.Text; using System.Runtime.Serialization.Formatters.Binary; using System.Threading; using System.Runtime.CompilerServices; // Duplicated in vm\COMSecurityConfig.h [Serializable,Flags] internal enum QuickCacheEntryType { FullTrustZoneMyComputer = 0x1000000, FullTrustZoneIntranet = 0x2000000, FullTrustZoneInternet = 0x4000000, FullTrustZoneTrusted = 0x8000000, FullTrustZoneUntrusted = 0x10000000, FullTrustAll = 0x20000000, } internal static class Config { private static string m_machineConfig; private static string m_userConfig; private static void GetFileLocales() { if (m_machineConfig == null) m_machineConfig = _GetMachineDirectory(); if (m_userConfig == null) m_userConfig = _GetUserDirectory(); } internal static string MachineDirectory { get { GetFileLocales(); return m_machineConfig; } } internal static string UserDirectory { get { GetFileLocales(); return m_userConfig; } } [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool SaveDataByte(string path, byte[] data, int offset, int length); [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool RecoverData(ConfigId id); [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void SetQuickCache(ConfigId id, QuickCacheEntryType quickCacheFlags); [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool GetCacheEntry(ConfigId id, int numKey, char[] key, out byte[] data); [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void AddCacheEntry(ConfigId id, int numKey, char[] key, byte[] data); [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void ResetCacheData(ConfigId id); [MethodImplAttribute(MethodImplOptions.InternalCall)] private static extern string _GetMachineDirectory(); [MethodImplAttribute(MethodImplOptions.InternalCall)] private static extern string _GetUserDirectory(); [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool WriteToEventLog(string message); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- webclient.cs
- InvalidPropValue.cs
- XPathPatternBuilder.cs
- HttpListenerRequestUriBuilder.cs
- StateChangeEvent.cs
- ToolBarOverflowPanel.cs
- EncryptedKeyIdentifierClause.cs
- SAPIEngineTypes.cs
- DataGridViewCell.cs
- SoapMessage.cs
- FactoryGenerator.cs
- AmbientValueAttribute.cs
- TableAutomationPeer.cs
- NotifyParentPropertyAttribute.cs
- UriScheme.cs
- SqlDataSourceAdvancedOptionsForm.cs
- ReturnEventArgs.cs
- TimeSpan.cs
- EdmScalarPropertyAttribute.cs
- ObservableCollection.cs
- BinaryMethodMessage.cs
- TextWriterEngine.cs
- KeyPullup.cs
- RectAnimationUsingKeyFrames.cs
- PropertyFilter.cs
- SystemUdpStatistics.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- Crypto.cs
- SystemInfo.cs
- LocatorBase.cs
- SamlAssertionKeyIdentifierClause.cs
- RotationValidation.cs
- XamlToRtfWriter.cs
- ImageMapEventArgs.cs
- DataGridColumnCollection.cs
- RegisteredArrayDeclaration.cs
- Bezier.cs
- ContainerSelectorGlyph.cs
- SymbolType.cs
- Debugger.cs
- WsdlImporter.cs
- FtpCachePolicyElement.cs
- HttpHandlerActionCollection.cs
- EventMappingSettings.cs
- SynchronizationLockException.cs
- DbConnectionPoolGroupProviderInfo.cs
- AnimationTimeline.cs
- TransactionalPackage.cs
- XmlCollation.cs
- ServiceBehaviorElement.cs
- MappingException.cs
- DataGridViewCellLinkedList.cs
- ApplicationId.cs
- CodeGotoStatement.cs
- TableLayoutRowStyleCollection.cs
- DependencyPropertyKey.cs
- CodeAttributeDeclarationCollection.cs
- MembershipSection.cs
- RectValueSerializer.cs
- ObjectConverter.cs
- BrowserCapabilitiesFactory.cs
- Content.cs
- Helpers.cs
- GridViewSortEventArgs.cs
- ParseNumbers.cs
- CacheEntry.cs
- Identifier.cs
- MoveSizeWinEventHandler.cs
- BasicKeyConstraint.cs
- CompleteWizardStep.cs
- assertwrapper.cs
- TypeConverterValueSerializer.cs
- ToolStripOverflowButton.cs
- DataSvcMapFile.cs
- XmlIncludeAttribute.cs
- XmlSerializerNamespaces.cs
- JsonSerializer.cs
- SchemaCollectionCompiler.cs
- DataRowChangeEvent.cs
- WebBrowserNavigatingEventHandler.cs
- ScriptModule.cs
- DrawingGroup.cs
- PointAnimation.cs
- DescendantQuery.cs
- DelegatingTypeDescriptionProvider.cs
- LogicalChannelCollection.cs
- ProtocolsSection.cs
- XmlSchema.cs
- WebEvents.cs
- CheckBoxList.cs
- CodeVariableReferenceExpression.cs
- CopyAttributesAction.cs
- PageEventArgs.cs
- XPathPatternBuilder.cs
- CryptoConfig.cs
- CompositeDataBoundControl.cs
- RequiredFieldValidator.cs
- BezierSegment.cs
- ArgIterator.cs
- BindingFormattingDialog.cs