/// <summary> /// Returns all of the properties for a given <see cref="RemoteDescriptor"/>. /// </summary> /// <param name="remote"></param> /// <param name="serializer"></param> /// <returns></returns> internal static IEnumerable <JProperty> InterfaceToProperties(RemoteDescriptor remote, JsonSerializer serializer) { Contract.Requires <ArgumentNullException>(serializer != null); foreach (var property in GetRemoteProperties(remote.Type)) { yield return(new JProperty(property.Name, JTokenFromObject(property.GetValue(remote.Target), serializer))); } }
/// <summary> /// Returns all of the properties for a given <see cref="RemoteDescriptor"/>. /// </summary> /// <param name="remote"></param> /// <param name="serializer"></param> /// <returns></returns> internal static IEnumerable<JProperty> InterfaceToProperties(RemoteDescriptor remote, JsonSerializer serializer) { Contract.Requires<ArgumentNullException>(serializer != null); foreach (var property in GetRemoteProperties(remote.Type)) yield return new JProperty(property.Name, JTokenFromObject(property.GetValue(remote.Target), serializer)); }