Example #1
0
 IEnumerable <KeyValuePair <string, PhpValue> > JsonObjectProperties(object /*!*/ obj)
 {
     return(TypeMembersUtils.EnumerateInstanceFields(obj, (f, d) => f.Name, (k) => k.ToString()));
 }
Example #2
0
                // static IEnumerable<KeyValuePair<string, PhpValue>> JsonArrayProperties(PhpArray array)
                // {
                //     var enumerator = array.GetFastEnumerator();
                //     while (enumerator.MoveNext())
                //     {
                //         var current = enumerator.Current;
                //         yield return new KeyValuePair<string, PhpValue>(current.Key.ToString(), current.Value);
                //     }
                // }

                static IEnumerable <KeyValuePair <string, PhpValue> > JsonObjectProperties(object /*!*/ obj)
                {
                    return(TypeMembersUtils.EnumerateInstanceFields(obj, TypeMembersUtils.s_propertyName, TypeMembersUtils.s_keyToString));
                }