Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Security / Util / Config.cs / 1 / 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); } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebBrowserDocumentCompletedEventHandler.cs
- StandardCommands.cs
- TimeSpanSecondsConverter.cs
- TreeViewAutomationPeer.cs
- StrongNamePublicKeyBlob.cs
- ReachDocumentReferenceCollectionSerializer.cs
- SQLInt32Storage.cs
- ExtendedPropertyCollection.cs
- XmlResolver.cs
- TextRangeEdit.cs
- Input.cs
- TemplateField.cs
- MainMenu.cs
- UnwrappedTypesXmlSerializerManager.cs
- SecurityContextSecurityTokenAuthenticator.cs
- ToolStripDropDownItem.cs
- WebPartActionVerb.cs
- PageAsyncTaskManager.cs
- HttpResponseInternalWrapper.cs
- TableStyle.cs
- RotateTransform3D.cs
- Debug.cs
- log.cs
- XmlSchemaType.cs
- LambdaCompiler.Binary.cs
- ScriptResourceHandler.cs
- ObjectListShowCommandsEventArgs.cs
- ISSmlParser.cs
- TargetControlTypeCache.cs
- RestHandler.cs
- RuleDefinitions.cs
- InstanceKeyCompleteException.cs
- IndentTextWriter.cs
- WebBodyFormatMessageProperty.cs
- UpWmlMobileTextWriter.cs
- ArithmeticException.cs
- NotSupportedException.cs
- GridViewColumnCollection.cs
- DataGridItemEventArgs.cs
- PropertyDescriptorGridEntry.cs
- DiscreteKeyFrames.cs
- Comparer.cs
- XmlCollation.cs
- NavigationWindow.cs
- SqlCacheDependencyDatabase.cs
- SqlCommandBuilder.cs
- AmbientProperties.cs
- IntegerValidatorAttribute.cs
- MyContact.cs
- XmlLanguageConverter.cs
- CookielessHelper.cs
- ListViewGroupConverter.cs
- InheritedPropertyChangedEventArgs.cs
- RegexMatchCollection.cs
- BindStream.cs
- EdmScalarPropertyAttribute.cs
- ClientRoleProvider.cs
- SQLBoolean.cs
- DrawingServices.cs
- Cursors.cs
- Token.cs
- TypedTableBaseExtensions.cs
- MetadataArtifactLoaderFile.cs
- GridViewHeaderRowPresenter.cs
- FullTrustAssembliesSection.cs
- SqlReferenceCollection.cs
- NotifyInputEventArgs.cs
- KeysConverter.cs
- contentDescriptor.cs
- ObjectItemCachedAssemblyLoader.cs
- MsdtcClusterUtils.cs
- SiteMapNodeItemEventArgs.cs
- UnsafeNativeMethods.cs
- DataObjectCopyingEventArgs.cs
- XmlStreamStore.cs
- BooleanFunctions.cs
- WorkflowOperationErrorHandler.cs
- MatrixUtil.cs
- XmlSchemaNotation.cs
- DefaultValueConverter.cs
- WebBrowserBase.cs
- SessionParameter.cs
- CustomAssemblyResolver.cs
- IntranetCredentialPolicy.cs
- ExtensionSimplifierMarkupObject.cs
- NameValueFileSectionHandler.cs
- TextTreeInsertUndoUnit.cs
- XPathArrayIterator.cs
- WindowsAuthenticationEventArgs.cs
- AutoResizedEvent.cs
- LiteralTextContainerControlBuilder.cs
- PeerNameResolver.cs
- sqlinternaltransaction.cs
- DesignerView.xaml.cs
- SqlConnection.cs
- SqlTypesSchemaImporter.cs
- RepeatBehaviorConverter.cs
- GetWinFXPath.cs
- FormatterServicesNoSerializableCheck.cs
- DiscoveryExceptionDictionary.cs