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
- ServiceObjectContainer.cs
- Parser.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ZipIOModeEnforcingStream.cs
- CodeDomExtensionMethods.cs
- MailSettingsSection.cs
- ProtocolViolationException.cs
- MethodBody.cs
- Script.cs
- ApplicationActivator.cs
- XsltConvert.cs
- InvalidPrinterException.cs
- DispatcherExceptionEventArgs.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- dataSvcMapFileLoader.cs
- RegexWriter.cs
- CatalogPart.cs
- JournalNavigationScope.cs
- ProfileSection.cs
- ModifiableIteratorCollection.cs
- DataGridViewImageColumn.cs
- RegexWorker.cs
- ListViewDeletedEventArgs.cs
- ExpressionBuilder.cs
- DoubleLinkListEnumerator.cs
- ConnectionsZoneAutoFormat.cs
- XmlSchemaRedefine.cs
- FixedSOMTableCell.cs
- KeySplineConverter.cs
- FrameworkObject.cs
- StateMachineHelpers.cs
- SqlLiftWhereClauses.cs
- ValidationErrorEventArgs.cs
- XslTransform.cs
- OdbcCommandBuilder.cs
- FieldCollectionEditor.cs
- RequestedSignatureDialog.cs
- NullableDoubleSumAggregationOperator.cs
- _LazyAsyncResult.cs
- Internal.cs
- CodeAssignStatement.cs
- DataBindingHandlerAttribute.cs
- StylusCollection.cs
- BrushMappingModeValidation.cs
- RsaSecurityTokenAuthenticator.cs
- CookieParameter.cs
- httpapplicationstate.cs
- DeobfuscatingStream.cs
- CallbackTimeoutsBehavior.cs
- QilTypeChecker.cs
- safex509handles.cs
- RawStylusInputReport.cs
- AxDesigner.cs
- SmiGettersStream.cs
- UnlockInstanceAsyncResult.cs
- DataListAutoFormat.cs
- _Win32.cs
- ADRoleFactoryConfiguration.cs
- PageWrapper.cs
- ListView.cs
- ChannelSinkStacks.cs
- DelegateSerializationHolder.cs
- CompModSwitches.cs
- GeometryDrawing.cs
- Unit.cs
- FragmentQueryProcessor.cs
- StringAttributeCollection.cs
- BufferedGenericXmlSecurityToken.cs
- AttributeUsageAttribute.cs
- GenericPrincipal.cs
- _FtpDataStream.cs
- PositiveTimeSpanValidator.cs
- Environment.cs
- _AutoWebProxyScriptWrapper.cs
- RootProfilePropertySettingsCollection.cs
- XmlAttributes.cs
- BoundPropertyEntry.cs
- _AutoWebProxyScriptEngine.cs
- ResponseBodyWriter.cs
- XmlReturnReader.cs
- FlowLayoutSettings.cs
- DataSourceCache.cs
- MouseWheelEventArgs.cs
- HighlightVisual.cs
- BinaryCommonClasses.cs
- IISMapPath.cs
- ColumnMapProcessor.cs
- GatewayIPAddressInformationCollection.cs
- WmlObjectListAdapter.cs
- DataGridViewRowCancelEventArgs.cs
- PropertyPathConverter.cs
- ConnectionPoint.cs
- ObjectManager.cs
- DirectionalLight.cs
- WriteableOnDemandPackagePart.cs
- TemplateControlParser.cs
- regiisutil.cs
- SoapProtocolImporter.cs
- EncoderParameter.cs
- Timer.cs