Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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;
            }
        }
Ejemplo n.º 3
0
        public static IDictionary <string, object> GetDictionary(string key = "")
        {
            RemoteSettings.UseSafeLock();
            IDictionary <string, object> dictionary = RemoteConfigSettingsHelper.GetDictionary(RemoteSettings.GetSafeTopMap(), key);

            RemoteSettings.ReleaseSafeLock();
            return(dictionary);
        }
Ejemplo n.º 4
0
 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));
 }
Ejemplo n.º 5
0
 internal static IDictionary <string, object> GetArrayMapEntries(IntPtr a, long i)
 {
     return(RemoteConfigSettingsHelper.GetDictionary(RemoteConfigSettingsHelper.GetSafeArrayMap(a, i)));
 }