示例#1
0
 /// <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));
 }
示例#2
0
 /// <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));
 }