7 internal static class Config
9 private static volatile string m_machineConfig;
11 private static volatile string m_userConfig;
13 internal static string MachineDirectory
19 return m_machineConfig;
23 internal static string UserDirectory
34 private static void GetFileLocales()
36 if (m_machineConfig ==
null)
39 GetMachineDirectory(JitHelpers.GetStringHandleOnStack(ref s));
42 if (m_userConfig ==
null)
45 GetUserDirectory(JitHelpers.GetStringHandleOnStack(ref s2));
52 [SuppressUnmanagedCodeSecurity]
53 internal static extern int SaveDataByte(
string path, [In]
byte[] data,
int length);
57 [SuppressUnmanagedCodeSecurity]
58 internal static extern bool RecoverData(ConfigId
id);
62 [SuppressUnmanagedCodeSecurity]
63 internal static extern void SetQuickCache(ConfigId
id, QuickCacheEntryType quickCacheFlags);
67 [SuppressUnmanagedCodeSecurity]
68 private static extern bool GetCacheEntry(ConfigId
id,
int numKey, [In]
byte[] key,
int keyLength, ObjectHandleOnStack retData);
71 internal static bool GetCacheEntry(ConfigId
id,
int numKey,
byte[] key, out
byte[] data)
74 bool cacheEntry = GetCacheEntry(
id, numKey, key, key.Length, JitHelpers.GetObjectHandleOnStack(ref o));
81 [SuppressUnmanagedCodeSecurity]
82 private static extern void AddCacheEntry(ConfigId
id,
int numKey, [In]
byte[] key,
int keyLength,
byte[] data,
int dataLength);
85 internal static void AddCacheEntry(ConfigId
id,
int numKey,
byte[] key,
byte[] data)
87 AddCacheEntry(
id, numKey, key, key.Length, data, data.Length);
92 [SuppressUnmanagedCodeSecurity]
93 internal static extern void ResetCacheData(ConfigId
id);
97 [SuppressUnmanagedCodeSecurity]
98 private static extern void GetMachineDirectory(StringHandleOnStack retDirectory);
102 [SuppressUnmanagedCodeSecurity]
103 private static extern void GetUserDirectory(StringHandleOnStack retDirectory);
107 [SuppressUnmanagedCodeSecurity]
108 internal static extern bool WriteToEventLog(
string message);
CharSet
Dictates which character set marshaled strings should use.