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
- FileDialog.cs
- UnmanagedHandle.cs
- SafeNativeMemoryHandle.cs
- _IPv4Address.cs
- HttpCapabilitiesBase.cs
- COM2PropertyDescriptor.cs
- XmlReflectionImporter.cs
- DBCommand.cs
- PackagePartCollection.cs
- QueryCacheEntry.cs
- TreeNodeCollection.cs
- SponsorHelper.cs
- EntityDataSourceQueryBuilder.cs
- ArgumentOutOfRangeException.cs
- ButtonBaseAutomationPeer.cs
- XmlNodeChangedEventArgs.cs
- XslCompiledTransform.cs
- StyleBamlRecordReader.cs
- InvalidCastException.cs
- LiteralControl.cs
- Model3D.cs
- SimpleFileLog.cs
- EntitySet.cs
- TimeSpanValidatorAttribute.cs
- Ipv6Element.cs
- WorkflowRuntimeSection.cs
- CodeEntryPointMethod.cs
- XmlText.cs
- InvokeBase.cs
- DataBindingHandlerAttribute.cs
- WebBrowsableAttribute.cs
- LinearQuaternionKeyFrame.cs
- CharUnicodeInfo.cs
- LocalizationParserHooks.cs
- SqlCacheDependencyDatabaseCollection.cs
- CompilationSection.cs
- DBBindings.cs
- RadialGradientBrush.cs
- BindingList.cs
- NativeMethods.cs
- StrokeDescriptor.cs
- DocumentOrderComparer.cs
- ObjectQuery_EntitySqlExtensions.cs
- DayRenderEvent.cs
- MenuAutomationPeer.cs
- EntityWithKeyStrategy.cs
- DbDataSourceEnumerator.cs
- MD5CryptoServiceProvider.cs
- ResourceReferenceExpressionConverter.cs
- RuntimeCompatibilityAttribute.cs
- Journal.cs
- SyndicationFeed.cs
- MatrixTransform3D.cs
- GPPOINTF.cs
- Vector3DCollection.cs
- FixedSOMPage.cs
- InternalBase.cs
- SharedPersonalizationStateInfo.cs
- DBConnection.cs
- ContentFilePart.cs
- ITreeGenerator.cs
- ComplexType.cs
- Matrix3D.cs
- AssemblyNameProxy.cs
- SpeakInfo.cs
- Relationship.cs
- SqlNamer.cs
- EventLogInternal.cs
- ToolStripDropDownMenu.cs
- CachedCompositeFamily.cs
- TransformedBitmap.cs
- SolidColorBrush.cs
- SchemaElement.cs
- SafeFindHandle.cs
- IFlowDocumentViewer.cs
- AttachmentService.cs
- ImageListUtils.cs
- Span.cs
- MaskedTextBoxDesigner.cs
- UnsafeNativeMethods.cs
- WsdlBuildProvider.cs
- NamedPermissionSet.cs
- NativeMethods.cs
- UniqueEventHelper.cs
- Rule.cs
- TableCell.cs
- DetailsViewDeletedEventArgs.cs
- CommandHelper.cs
- PageCodeDomTreeGenerator.cs
- CollectionsUtil.cs
- FrameworkEventSource.cs
- SqlStream.cs
- SortDescriptionCollection.cs
- Stack.cs
- BoundsDrawingContextWalker.cs
- SqlTopReducer.cs
- TreeView.cs
- FontUnit.cs
- ViewStateException.cs
- AssemblyBuilder.cs