Exemple #1
0
        public static IDictionary <string, object> ToDictionary(this object source, ITypeCache typeCache)
        {
            if (source == null)
            {
                return(new Dictionary <string, object>());
            }
            if (source is IDictionary <string, object> objects)
            {
                return(objects);
            }
            if (source is ODataEntry entry)
            {
                return((Dictionary <string, object>)entry);
            }

            return(typeCache.ToDictionary(source));
        }