/// <summary> /// Serializes the object into fields and adds them to the message /// </summary> public static Message SetFieldsFromObject(this Message msg, object obj) { return(MessageModule.SetFieldsFromObject(obj, msg)); }
/// <summary> /// Add the key-value pairs to the data /// </summary> public static Message SetFieldsFromObject(this Message msg, IEnumerable <KeyValuePair <string, Field> > fields) { return(MessageModule.SetFieldsFromObject(fields.Select(kv => Tuple.Create(PointNameModule.Parse(kv.Key), kv.Value)), msg)); }