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
- PolicyStatement.cs
- MergablePropertyAttribute.cs
- UserControlBuildProvider.cs
- XmlAtomicValue.cs
- PackagePart.cs
- xamlnodes.cs
- CodeParameterDeclarationExpressionCollection.cs
- XsltOutput.cs
- PartialTrustVisibleAssembly.cs
- DependencyObject.cs
- CodeCompiler.cs
- ExitEventArgs.cs
- StyleXamlParser.cs
- _LoggingObject.cs
- ColorContext.cs
- AutoGeneratedFieldProperties.cs
- SystemSounds.cs
- GraphicsPath.cs
- ListViewTableRow.cs
- DataColumnPropertyDescriptor.cs
- xmlglyphRunInfo.cs
- CalendarDataBindingHandler.cs
- AppSettingsSection.cs
- PlainXmlWriter.cs
- ThicknessKeyFrameCollection.cs
- DecimalAverageAggregationOperator.cs
- DataViewSettingCollection.cs
- Repeater.cs
- BamlCollectionHolder.cs
- ButtonStandardAdapter.cs
- PriorityRange.cs
- AspNetSynchronizationContext.cs
- Point.cs
- ToolStripContentPanelRenderEventArgs.cs
- SQLByteStorage.cs
- UrlAuthFailedErrorFormatter.cs
- ClaimSet.cs
- TemplatePartAttribute.cs
- PocoPropertyAccessorStrategy.cs
- RawTextInputReport.cs
- SequentialOutput.cs
- EnterpriseServicesHelper.cs
- QueryExpr.cs
- _ConnectOverlappedAsyncResult.cs
- DeferredRunTextReference.cs
- ValidationSummary.cs
- VectorAnimationBase.cs
- OleStrCAMarshaler.cs
- StringKeyFrameCollection.cs
- SkipQueryOptionExpression.cs
- XmlNodeComparer.cs
- DrawingImage.cs
- DebugInfoGenerator.cs
- ConfigurationSection.cs
- InstanceData.cs
- OracleNumber.cs
- COM2IPerPropertyBrowsingHandler.cs
- ToolboxComponentsCreatedEventArgs.cs
- CacheEntry.cs
- SessionPageStateSection.cs
- AxisAngleRotation3D.cs
- DataGridRow.cs
- DataSetMappper.cs
- VisualTreeHelper.cs
- SecurityRuntime.cs
- TdsParser.cs
- CodeIdentifier.cs
- xmlglyphRunInfo.cs
- ChannelSettingsElement.cs
- EntityParameter.cs
- _UriSyntax.cs
- ResourceDisplayNameAttribute.cs
- LifetimeServices.cs
- JulianCalendar.cs
- MarkupCompilePass2.cs
- SecurityDocument.cs
- ComUdtElement.cs
- ThousandthOfEmRealDoubles.cs
- DependencyPropertyHelper.cs
- IdentityModelDictionary.cs
- ImageDrawing.cs
- thaishape.cs
- BindingUtils.cs
- SspiWrapper.cs
- RegexMatch.cs
- FamilyTypefaceCollection.cs
- XmlMapping.cs
- DefaultBinder.cs
- _OverlappedAsyncResult.cs
- PrtTicket_Public.cs
- Metadata.cs
- MetadataHelper.cs
- WindowsGraphics2.cs
- HttpProcessUtility.cs
- WebServicesSection.cs
- AuthenticationSection.cs
- ParallelEnumerableWrapper.cs
- XmlProcessingInstruction.cs
- XPathNodeList.cs
- DataSourceGroupCollection.cs