public static PropertyAccessor Create(Type type, object instance) { if (instance is Dictionary <string, object> dict) { return(DictionaryAccessor.Create(dict)); } return(new PropertyAccessor(type)); }
internal static PropertyAccessor CreateMapReduceOutputAccessor(Type type, object instance, HashSet <CompiledIndexField> _groupByFields) { if (instance is Dictionary <string, object> dict) { return(DictionaryAccessor.Create(dict, _groupByFields)); } return(new PropertyAccessor(type, _groupByFields)); }
public static IPropertyAccessor Create(Type type, object instance) { if (type == typeof(ObjectInstance)) { return(new JintPropertyAccessor(null)); } if (instance is Dictionary <string, object> dict) { return(DictionaryAccessor.Create(dict)); } return(new PropertyAccessor(type)); }
internal static IPropertyAccessor CreateMapReduceOutputAccessor(Type type, object instance, HashSet <CompiledIndexField> groupByFields, bool isObjectInstance = false) { if (isObjectInstance || type == typeof(ObjectInstance) || type.IsSubclassOf(typeof(ObjectInstance))) { return(new JintPropertyAccessor(groupByFields)); } if (instance is Dictionary <string, object> dict) { return(DictionaryAccessor.Create(dict, groupByFields)); } return(new PropertyAccessor(type, groupByFields)); }
internal static IPropertyAccessor CreateMapReduceOutputAccessor(Type type, object instance, HashSet <string> _groupByFields, bool isObjectInstance = false) { if (isObjectInstance || type == typeof(ObjectInstance)) { return(new JintPropertyAccessor(_groupByFields)); } if (instance is Dictionary <string, object> dict) { return(DictionaryAccessor.Create(dict, _groupByFields)); } return(new PropertyAccessor(type, _groupByFields)); }