本文整理汇总了C#中Message.ToJsonString方法的典型用法代码示例。如果您正苦于以下问题:C# Message.ToJsonString方法的具体用法?C# Message.ToJsonString怎么用?C# Message.ToJsonString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Message
的用法示例。
在下文中一共展示了Message.ToJsonString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PublicSquareLineEntity
public PublicSquareLineEntity(Message msg)
{
this.PartitionKey = Utils.ToAzureStorageDayBasedString(msg.PostTime.ToUniversalTime());
this.RowKey = msg.ID;
Content = msg.ToJsonString();
}
示例2: SendInternal
protected override Message SendInternal(Message message)
{
var json = message.ToJsonString();
socket.Send(json, Encoding.UTF8);
var response = socket.Receive(Encoding.UTF8);
return Message.FromJson(response);
}
示例3: EventLineEntity
public EventLineEntity(Message msg)
{
this.PartitionKey = string.Format("{0}_{1}", msg.EventID,
Utils.ToAzureStorageDayBasedString(msg.PostTime.ToUniversalTime()));
this.RowKey = msg.ID;
Content = msg.ToJsonString();
}
示例4: UserLineEntity
public UserLineEntity(Message msg, int replyCount = 0)
{
this.PartitionKey = string.Format("{0}_{1}", msg.User,
Utils.ToAzureStorageDayBasedString(msg.PostTime.ToUniversalTime())); //Partition key
this.RowKey = msg.ID;
Content = msg.ToJsonString();
//RetweetCount = retweetCount;
ReplyCount = replyCount;
}
示例5: Response
/// <summary>
/// Responses the specified message.
/// </summary>
/// <param name="message">The message.</param>
internal void Response(Message message)
{
var json = message.ToJsonString();
socket.Send(json);
}