public static IDictionary <string, object> GetDictionary(IntPtr m, string key) { bool flag = m == IntPtr.Zero; IDictionary <string, object> result; if (flag) { result = null; } else { bool flag2 = !string.IsNullOrEmpty(key); if (flag2) { m = RemoteConfigSettingsHelper.GetSafeMap(m, key); bool flag3 = m == IntPtr.Zero; if (flag3) { result = null; return(result); } } result = RemoteConfigSettingsHelper.GetDictionary(m); } return(result); }
internal static object GetMixedArrayEntries(IntPtr a) { long safeArraySize = RemoteConfigSettingsHelper.GetSafeArraySize(a); object[] objArray = new object[safeArraySize]; return((object)objArray); }
internal static void SetDictKeyType(IntPtr m, IDictionary <string, object> dict, string key, RemoteConfigSettingsHelper.Tag tag) { switch (tag) { case RemoteConfigSettingsHelper.Tag.kIntVal: case RemoteConfigSettingsHelper.Tag.kInt64Val: dict[key] = RemoteConfigSettingsHelper.GetSafeNumber(m, key, 0L); break; case RemoteConfigSettingsHelper.Tag.kDoubleVal: dict[key] = RemoteConfigSettingsHelper.GetSafeFloat(m, key, 0f); break; case RemoteConfigSettingsHelper.Tag.kBoolVal: dict[key] = RemoteConfigSettingsHelper.GetSafeBool(m, key, false); break; case RemoteConfigSettingsHelper.Tag.kStringVal: dict[key] = RemoteConfigSettingsHelper.GetSafeStringValue(m, key, ""); break; case RemoteConfigSettingsHelper.Tag.kArrayVal: dict[key] = RemoteConfigSettingsHelper.GetArrayEntries(RemoteConfigSettingsHelper.GetSafeArray(m, key)); break; case RemoteConfigSettingsHelper.Tag.kMixedArrayVal: dict[key] = RemoteConfigSettingsHelper.GetMixedArrayEntries(RemoteConfigSettingsHelper.GetSafeArray(m, key)); break; case RemoteConfigSettingsHelper.Tag.kMapVal: dict[key] = RemoteConfigSettingsHelper.GetDictionary(RemoteConfigSettingsHelper.GetSafeMap(m, key)); break; } }
public static IDictionary <string, object> GetDictionary(string key = "") { RemoteSettings.UseSafeLock(); IDictionary <string, object> dictionary = RemoteConfigSettingsHelper.GetDictionary(RemoteSettings.GetSafeTopMap(), key); RemoteSettings.ReleaseSafeLock(); return(dictionary); }
internal static object GetMixedArrayEntries(IntPtr a) { long safeArraySize = RemoteConfigSettingsHelper.GetSafeArraySize(a); bool flag = safeArraySize == 0L; object result; if (flag) { result = null; } else { object[] array = new object[safeArraySize]; for (long num = 0L; num < safeArraySize; num += 1L) { checked { switch (RemoteConfigSettingsHelper.GetSafeArrayType(a, num)) { case RemoteConfigSettingsHelper.Tag.kIntVal: case RemoteConfigSettingsHelper.Tag.kInt64Val: array[(int)((IntPtr)num)] = RemoteConfigSettingsHelper.GetSafeNumberArray(a, num); break; case RemoteConfigSettingsHelper.Tag.kDoubleVal: array[(int)((IntPtr)num)] = RemoteConfigSettingsHelper.GetSafeArrayFloat(a, num); break; case RemoteConfigSettingsHelper.Tag.kBoolVal: array[(int)((IntPtr)num)] = RemoteConfigSettingsHelper.GetSafeArrayBool(a, num); break; case RemoteConfigSettingsHelper.Tag.kStringVal: array[(int)((IntPtr)num)] = RemoteConfigSettingsHelper.GetSafeArrayStringValue(a, num); break; case RemoteConfigSettingsHelper.Tag.kArrayVal: array[(int)((IntPtr)num)] = RemoteConfigSettingsHelper.GetArrayArrayEntries(a, num); break; case RemoteConfigSettingsHelper.Tag.kMapVal: array[(int)((IntPtr)num)] = RemoteConfigSettingsHelper.GetArrayMapEntries(a, num); break; } } } result = array; } return(result); }
public static IDictionary <string, object> GetDictionary(IntPtr m, string key) { if (m == IntPtr.Zero) { return(null); } if (!String.IsNullOrEmpty(key)) { m = GetSafeMap(m, key); if (m == IntPtr.Zero) { return(null); } } return(RemoteConfigSettingsHelper.GetDictionary(m)); }
internal static object GetArrayEntries(IntPtr a) { long safeArraySize = RemoteConfigSettingsHelper.GetSafeArraySize(a); bool flag = safeArraySize == 0L; object result; if (flag) { result = null; } else { switch (RemoteConfigSettingsHelper.GetSafeArrayType(a, 0L)) { case RemoteConfigSettingsHelper.Tag.kIntVal: case RemoteConfigSettingsHelper.Tag.kInt64Val: result = RemoteConfigSettingsHelper.GetArrayEntriesType <long>(a, safeArraySize, new Func <IntPtr, long, long>(RemoteConfigSettingsHelper.GetSafeNumberArray)); return(result); case RemoteConfigSettingsHelper.Tag.kDoubleVal: result = RemoteConfigSettingsHelper.GetArrayEntriesType <float>(a, safeArraySize, new Func <IntPtr, long, float>(RemoteConfigSettingsHelper.GetSafeArrayFloat)); return(result); case RemoteConfigSettingsHelper.Tag.kBoolVal: result = RemoteConfigSettingsHelper.GetArrayEntriesType <bool>(a, safeArraySize, new Func <IntPtr, long, bool>(RemoteConfigSettingsHelper.GetSafeArrayBool)); return(result); case RemoteConfigSettingsHelper.Tag.kStringVal: result = RemoteConfigSettingsHelper.GetArrayEntriesType <string>(a, safeArraySize, new Func <IntPtr, long, string>(RemoteConfigSettingsHelper.GetSafeArrayStringValue)); return(result); case RemoteConfigSettingsHelper.Tag.kArrayVal: result = RemoteConfigSettingsHelper.GetArrayEntriesType <object>(a, safeArraySize, new Func <IntPtr, long, object>(RemoteConfigSettingsHelper.GetArrayArrayEntries)); return(result); case RemoteConfigSettingsHelper.Tag.kMapVal: result = RemoteConfigSettingsHelper.GetArrayEntriesType <IDictionary <string, object> >(a, safeArraySize, new Func <IntPtr, long, IDictionary <string, object> >(RemoteConfigSettingsHelper.GetArrayMapEntries)); return(result); } result = null; } return(result); }
internal static IDictionary <string, object> GetDictionary(IntPtr m) { bool flag = m == IntPtr.Zero; IDictionary <string, object> result; if (flag) { result = null; } else { IDictionary <string, object> dictionary = new Dictionary <string, object>(); RemoteConfigSettingsHelper.Tag[] safeMapTypes = RemoteConfigSettingsHelper.GetSafeMapTypes(m); string[] safeMapKeys = RemoteConfigSettingsHelper.GetSafeMapKeys(m); for (int i = 0; i < safeMapKeys.Length; i++) { RemoteConfigSettingsHelper.SetDictKeyType(m, dictionary, safeMapKeys[i], safeMapTypes[i]); } result = dictionary; } return(result); }
internal static IDictionary <string, object> GetArrayMapEntries(IntPtr a, long i) { return(RemoteConfigSettingsHelper.GetDictionary(RemoteConfigSettingsHelper.GetSafeArrayMap(a, i))); }
internal static object GetArrayArrayEntries(IntPtr a, long i) { return(RemoteConfigSettingsHelper.GetArrayEntries(RemoteConfigSettingsHelper.GetSafeArrayArray(a, i))); }