Code:
/ DotNET / DotNET / 8.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
- ListControl.cs
- TypeDescriptor.cs
- AsymmetricSignatureFormatter.cs
- Columns.cs
- RegexMatchCollection.cs
- DelegateBodyWriter.cs
- ItemCollection.cs
- FormView.cs
- GCHandleCookieTable.cs
- WebPartVerb.cs
- MethodToken.cs
- VerificationException.cs
- QueueProcessor.cs
- DeviceSpecificDialogCachedState.cs
- UInt64Converter.cs
- MimeObjectFactory.cs
- Stacktrace.cs
- QilStrConcat.cs
- ObjectConverter.cs
- XmlSchemaSimpleContentExtension.cs
- CodeDesigner.cs
- DateRangeEvent.cs
- FileVersionInfo.cs
- DataSourceHelper.cs
- BypassElement.cs
- SubMenuStyleCollectionEditor.cs
- AutomationElementCollection.cs
- ProfileSection.cs
- TextBox.cs
- DataPagerField.cs
- DotExpr.cs
- FacetEnabledSchemaElement.cs
- DesignerDataStoredProcedure.cs
- StateMachineWorkflowDesigner.cs
- ValidationHelper.cs
- GZipStream.cs
- SHA384Managed.cs
- SocketCache.cs
- BufferedGraphics.cs
- ViewKeyConstraint.cs
- WebHttpBehavior.cs
- ReservationNotFoundException.cs
- TopClause.cs
- LabelAutomationPeer.cs
- XmlEntityReference.cs
- SvcMapFileSerializer.cs
- DataRowComparer.cs
- IxmlLineInfo.cs
- ContractUtils.cs
- ApplicationCommands.cs
- EndpointConfigContainer.cs
- ServiceChannel.cs
- Font.cs
- Nodes.cs
- RoutedEventConverter.cs
- TypedMessageConverter.cs
- DesignerAutoFormatCollection.cs
- IteratorDescriptor.cs
- CompilerInfo.cs
- ApplicationActivator.cs
- MonitorWrapper.cs
- Vector3DConverter.cs
- IssuanceTokenProviderBase.cs
- WinFormsSecurity.cs
- RegexStringValidatorAttribute.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- WsdlBuildProvider.cs
- EntityModelBuildProvider.cs
- EnumType.cs
- DbProviderFactories.cs
- InkCanvasSelectionAdorner.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- EmbeddedObject.cs
- DoubleSumAggregationOperator.cs
- KeyBinding.cs
- ActionItem.cs
- HtmlInputCheckBox.cs
- Propagator.cs
- TypefaceMap.cs
- ThicknessAnimationBase.cs
- XhtmlConformanceSection.cs
- StandardCommands.cs
- BidPrivateBase.cs
- SQLDateTime.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- PrintDialog.cs
- QuaternionValueSerializer.cs
- CachedFontFace.cs
- PermissionSet.cs
- SplineKeyFrames.cs
- ObjectDataSourceStatusEventArgs.cs
- OracleString.cs
- ModuleBuilder.cs
- QilDataSource.cs
- WebControlAdapter.cs
- Profiler.cs
- QilInvokeEarlyBound.cs
- TiffBitmapEncoder.cs
- _PooledStream.cs
- GridViewUpdatedEventArgs.cs