public static Dictionary AssertAsMap()

in csharp/core/Common.cs [309:323]


        public static Dictionary<string, object> AssertAsMap(object value)
        {
            if (value != null && value is IDictionary)
            {
                var dic = (IDictionary)value;
                var dicObj = dic.Keys.Cast<string>().ToDictionary(key => key, key => dic[key]);
                return dicObj;
            }
            else if (value is JObject)
            {
                return (Dictionary<string, object>)ReadJsonUtil.Deserialize(value);
            }

            throw new ArgumentException("The value is not Dictionary");
        }