Class Message
A message.
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Message : Dynamic
Properties
ApiServiceId
Gets or sets the API Service identifier.
Declaration
public string ApiServiceId { get; set; }
Property Value
Type | Description |
---|---|
System. |
ApiVersion
Gets or sets the API Version.
Declaration
public string ApiVersion { get; set; }
Property Value
Type | Description |
---|---|
System. |
ApplicationId
Gets or sets the application identifier.
Declaration
public string ApplicationId { get; set; }
Property Value
Type | Description |
---|---|
System. |
ChannelId
Gets or sets the channel identifier.
Declaration
public string ChannelId { get; set; }
Property Value
Type | Description |
---|---|
System. |
ChannelReports
Gets or sets the channel reports.
Declaration
public ChannelReport[] ChannelReports { get; set; }
Property Value
Type | Description |
---|---|
Channel |
ClientId
Gets or sets the client identifier.
Declaration
public string ClientId { get; set; }
Property Value
Type | Description |
---|---|
System. |
ClientProtocol
Gets or sets the client protocol.
Declaration
public string ClientProtocol { get; set; }
Property Value
Type | Description |
---|---|
System. |
ClientReports
Gets or sets the client reports.
Declaration
public ClientReport[] ClientReports { get; set; }
Property Value
Type | Description |
---|---|
Client |
ClientRoles
Gets or sets the client roles.
Declaration
public string[] ClientRoles { get; set; }
Property Value
Type | Description |
---|---|
System. |
ClientTag
Gets or sets the client tag.
Declaration
public string ClientTag { get; set; }
Property Value
Type | Description |
---|---|
System. |
ConnectionId
Gets or sets the connection identifier.
Declaration
public string ConnectionId { get; set; }
Property Value
Type | Description |
---|---|
System. |
ConnectionLayoutPriority
Gets or sets the connection LayoutPriority.
Declaration
public int? ConnectionLayoutPriority { get; set; }
Property Value
Type | Description |
---|---|
System. |
ConnectionLayoutZone
Gets or sets the connection LayoutZone.
Declaration
public string ConnectionLayoutZone { get; set; }
Property Value
Type | Description |
---|---|
System. |
ConnectionTag
Gets or sets the connection tag.
Declaration
public string ConnectionTag { get; set; }
Property Value
Type | Description |
---|---|
System. |
ConnectionType
Gets or sets the connection type.
Declaration
public string ConnectionType { get; set; }
Property Value
Type | Description |
---|---|
System. |
ConnectorId
Gets or sets the Connector identifer.
Declaration
public string ConnectorId { get; set; }
Property Value
Type | Description |
---|---|
System. |
DeviceAlias
Gets or sets the device alias.
Declaration
public string DeviceAlias { get; set; }
Property Value
Type | Description |
---|---|
System. |
DeviceId
Gets or sets the device identifier.
Declaration
public string DeviceId { get; set; }
Property Value
Type | Description |
---|---|
System. |
IceServers
Gets or sets the payload.
Declaration
public string IceServers { get; set; }
Property Value
Type | Description |
---|---|
System. |
IsHiddenObserver
Gets or sets if the offerer is a hidden observer.
Declaration
public bool IsHiddenObserver { get; set; }
Property Value
Type | Description |
---|---|
System. |
MediaId
Gets or sets the broadcast identifier.
Declaration
public string MediaId { get; set; }
Property Value
Type | Description |
---|---|
System. |
MediaServerId
Gets or sets the Media Server identifier.
Declaration
public string MediaServerId { get; set; }
Property Value
Type | Description |
---|---|
System. |
NoHostCandidates
Gets or sets the value indicating whether the client should avoid using local host ICE candidates. Client can override this request.
Declaration
public bool NoHostCandidates { get; set; }
Property Value
Type | Description |
---|---|
System. |
Payload
Gets or sets the payload.
Declaration
public string Payload { get; set; }
Property Value
Type | Description |
---|---|
System. |
PreferredMediaServerId
Gets or sets the preferred Media Server identifier.
Declaration
public string PreferredMediaServerId { get; set; }
Property Value
Type | Description |
---|---|
System. |
PreferredWebSocketMediaServerId
Gets or sets the preferred WebSocket Media Server identifier.
Declaration
public string PreferredWebSocketMediaServerId { get; set; }
Property Value
Type | Description |
---|---|
System. |
RecordingMonitorId
Gets or sets the Recording Monitor identifer.
Declaration
public string RecordingMonitorId { get; set; }
Property Value
Type | Description |
---|---|
System. |
RecordingMoverId
Gets or sets the Recording Mover identifer.
Declaration
public string RecordingMoverId { get; set; }
Property Value
Type | Description |
---|---|
System. |
RecordingMuxerId
Gets or sets the Recording Muxer identifer.
Declaration
public string RecordingMuxerId { get; set; }
Property Value
Type | Description |
---|---|
System. |
Region
Gets or sets the region.
Declaration
public string Region { get; set; }
Property Value
Type | Description |
---|---|
System. |
RemoteClientId
Gets or sets the remote client identifier.
Declaration
public string RemoteClientId { get; set; }
Property Value
Type | Description |
---|---|
System. |
RemoteConnectionId
Gets or sets the remote connection identifier.
Declaration
public string RemoteConnectionId { get; set; }
Property Value
Type | Description |
---|---|
System. |
RemoteDeviceId
Gets or sets the remote device identifier.
Declaration
public string RemoteDeviceId { get; set; }
Property Value
Type | Description |
---|---|
System. |
RemoteMediaId
Gets or sets the remote broadcast identifier.
Declaration
public string RemoteMediaId { get; set; }
Property Value
Type | Description |
---|---|
System. |
RemoteUserId
Gets or sets the remote user identifier.
Declaration
public string RemoteUserId { get; set; }
Property Value
Type | Description |
---|---|
System. |
RequestIceServers
Gets or sets the value indicating whether ICE Servers have been requested.
Declaration
public bool RequestIceServers { get; set; }
Property Value
Type | Description |
---|---|
System. |
Timestamp
Gets or sets the message timestamp.
Declaration
public long Timestamp { get; set; }
Property Value
Type | Description |
---|---|
System. |
Token
Gets or sets the token.
Declaration
public string Token { get; set; }
Property Value
Type | Description |
---|---|
System. |
TransactionId
Gets or sets the transaction identifier.
Declaration
public string TransactionId { get; set; }
Property Value
Type | Description |
---|---|
System. |
Type
Gets or sets the type.
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System. |
UserAlias
Gets or sets the user alias.
Declaration
public string UserAlias { get; set; }
Property Value
Type | Description |
---|---|
System. |
UserId
Gets or sets the user identifier.
Declaration
public string UserId { get; set; }
Property Value
Type | Description |
---|---|
System. |
WebSocketMediaServerId
Gets or sets the Media Server identifier.
Declaration
public string WebSocketMediaServerId { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
Clone()
Creates a copy of the Message.
Declaration
public Message Clone()
Returns
Type | Description |
---|---|
Message |
CreateBitrateNotificationMessage(BitrateNotification)
Creates a "bitrateNotification" message.
Declaration
public static Message CreateBitrateNotificationMessage(BitrateNotification bitrateNotification)
Parameters
Type | Name | Description |
---|---|---|
Bitrate |
bitrateNotification |
Returns
Type | Description |
---|---|
Message |
CreateBitrateNotificationMessage(BitrateNotification[])
Creates a "bitrateNotification" message.
Declaration
public static Message CreateBitrateNotificationMessage(BitrateNotification[] bitrateNotifications)
Parameters
Type | Name | Description |
---|---|---|
Bitrate |
bitrateNotifications |
Returns
Type | Description |
---|---|
Message |
CreateBitrateRequestMessage(BitrateRequest)
Creates a "bitrateRequest" message.
Declaration
public static Message CreateBitrateRequestMessage(BitrateRequest bitrateRequest)
Parameters
Type | Name | Description |
---|---|---|
Bitrate |
bitrateRequest |
Returns
Type | Description |
---|---|
Message |
CreateBitrateRequestMessage(BitrateRequest[])
Creates a "bitrateRequest" message.
Declaration
public static Message CreateBitrateRequestMessage(BitrateRequest[] bitrateRequests)
Parameters
Type | Name | Description |
---|---|---|
Bitrate |
bitrateRequests |
Returns
Type | Description |
---|---|
Message |
CreateCancelInviteMessage(String, String)
Creates a "cancelInvite" message.
Declaration
public static Message CreateCancelInviteMessage(string userId, string protocol)
Parameters
Type | Name | Description |
---|---|---|
System. |
userId | |
System. |
protocol |
Returns
Type | Description |
---|---|
Message |
CreateCandidateMessage(String)
Creates a "candidate" message.
Declaration
public static Message CreateCandidateMessage(string candidateJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
candidateJson | The candidate. |
Returns
Type | Description |
---|---|
Message |
CreateCloseMessage()
Creates a "close" message.
Declaration
public static Message CreateCloseMessage()
Returns
Type | Description |
---|---|
Message |
CreateDtmfTonesMessage(Tone[])
Creates a "dtmfTones" message.
Declaration
public static Message CreateDtmfTonesMessage(Tone[] dtmfTones)
Parameters
Type | Name | Description |
---|---|---|
Tone[] | dtmfTones |
Returns
Type | Description |
---|---|
Message |
CreateErrorMessage(String)
Creates a "error" message.
Declaration
public static Message CreateErrorMessage(string error)
Parameters
Type | Name | Description |
---|---|---|
System. |
error | The error type. |
Returns
Type | Description |
---|---|
Message |
CreateErrorMessage(String, String, String, String)
Creates a "error" message.
Declaration
public static Message CreateErrorMessage(string error, string remoteUserId, string remoteDeviceId, string remoteClientId)
Parameters
Type | Name | Description |
---|---|---|
System. |
error | The error type. |
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
Returns
Type | Description |
---|---|
Message |
CreateEventMessage(String)
Creates an "event" message.
Declaration
public static Message CreateEventMessage(string eventInfoJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
eventInfoJson |
Returns
Type | Description |
---|---|
Message |
CreateIceServersMessage()
Creates an "iceServers" message.
Declaration
public static Message CreateIceServersMessage()
Returns
Type | Description |
---|---|
Message |
CreateInviteMessage(String, String)
Creates a "invite" message.
Declaration
public static Message CreateInviteMessage(string userId, string protocol)
Parameters
Type | Name | Description |
---|---|---|
System. |
userId | |
System. |
protocol |
Returns
Type | Description |
---|---|
Message |
CreateJoinMessage(String, String)
Creates a "join" message.
Declaration
public static Message CreateJoinMessage(string channelId, string token)
Parameters
Type | Name | Description |
---|---|---|
System. |
channelId | The channel to join. |
System. |
token | The auth token. |
Returns
Type | Description |
---|---|
Message |
CreateKeyFrameRequestMessage(Int64[])
Creates a "keyFrameRequest" message.
Declaration
public static Message CreateKeyFrameRequestMessage(long[] synchronizationSources)
Parameters
Type | Name | Description |
---|---|---|
System. |
synchronizationSources |
Returns
Type | Description |
---|---|
Message |
CreateKickMessage(String, String)
Creates a "kick" message.
Declaration
public static Message CreateKickMessage(string channelId, string clientId)
Parameters
Type | Name | Description |
---|---|---|
System. |
channelId | The channel identifier. |
System. |
clientId | The ID of the client to kick. |
Returns
Type | Description |
---|---|
Message |
CreateKickMessage(String, String, String, String)
Creates a "kick" message.
Declaration
public static Message CreateKickMessage(string remoteUserId, string remoteDeviceId, string remoteClientId, string remoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
System. |
remoteConnectionId | The remote connection identifier. |
Returns
Type | Description |
---|---|
Message |
CreateLayoutMessage(String, String, String, String, String)
Creates a "layout" message.
Declaration
public static Message CreateLayoutMessage(string configJson, string remoteUserId, string remoteDeviceId, string remoteClientId, string remoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
System. |
configJson | The layout config to send to the server. |
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
System. |
remoteConnectionId | The remote connection identifier. |
Returns
Type | Description |
---|---|
Message |
CreateLeaveMessage(String, ChannelReport)
Creates a "leave" message.
Declaration
public static Message CreateLeaveMessage(string channelId, ChannelReport channelReport)
Parameters
Type | Name | Description |
---|---|---|
System. |
channelId | The channel to leave. |
Channel |
channelReport | The channel report. |
Returns
Type | Description |
---|---|
Message |
CreateMcuOfferMessage(String, Nullable<Int32>, String, String)
Creates an MCU "offer" message
Declaration
public static Message CreateMcuOfferMessage(string layoutZone, int? layoutPriority, string tag, string offerJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
layoutZone | The connection LayoutZone |
System. |
layoutPriority | The connection LayoutPriority |
System. |
tag | The tag |
System. |
offerJson | The offer. |
Returns
Type | Description |
---|---|
Message |
CreateMcuOfferMessage(String, String)
Creates an MCU "offer" message.
Declaration
public static Message CreateMcuOfferMessage(string tag, string offerJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
tag | The tag. |
System. |
offerJson | The offer. |
Returns
Type | Description |
---|---|
Message |
CreateMessageMessage(String)
Creates a "message" message.
Declaration
public static Message CreateMessageMessage(string message)
Parameters
Type | Name | Description |
---|---|---|
System. |
message | The message. |
Returns
Type | Description |
---|---|
Message |
CreateMessageMessage(String, String)
Creates a "message" message.
Declaration
public static Message CreateMessageMessage(string message, string remoteUserId)
Parameters
Type | Name | Description |
---|---|---|
System. |
message | The message. |
System. |
remoteUserId | The remote user identifier. |
Returns
Type | Description |
---|---|
Message |
CreateMessageMessage(String, String, String)
Creates a "message" message.
Declaration
public static Message CreateMessageMessage(string message, string remoteUserId, string remoteDeviceId)
Parameters
Type | Name | Description |
---|---|---|
System. |
message | The message. |
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
Returns
Type | Description |
---|---|
Message |
CreateMessageMessage(String, String, String, String)
Creates a "message" message.
Declaration
public static Message CreateMessageMessage(string message, string remoteUserId, string remoteDeviceId, string remoteClientId)
Parameters
Type | Name | Description |
---|---|---|
System. |
message | The message. |
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
Returns
Type | Description |
---|---|
Message |
CreatePeerAnswerMessage(String, String, String, String, String)
Creates a peer "answer" message.
Declaration
public static Message CreatePeerAnswerMessage(string tag, string answerJson, string remoteUserId, string remoteDeviceId, string remoteClientId)
Parameters
Type | Name | Description |
---|---|---|
System. |
tag | The tag. |
System. |
answerJson | The answer. |
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
Returns
Type | Description |
---|---|
Message |
CreatePeerCandidateMessage(String, String, String, String)
Creates a "candidate" message.
Declaration
public static Message CreatePeerCandidateMessage(string candidateJson, string remoteUserId, string remoteDeviceId, string remoteClientId)
Parameters
Type | Name | Description |
---|---|---|
System. |
candidateJson | The candidate. |
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
Returns
Type | Description |
---|---|
Message |
CreatePeerCloseMessage(String, String, String)
Creates a "close" message.
Declaration
public static Message CreatePeerCloseMessage(string remoteUserId, string remoteDeviceId, string remoteClientId)
Parameters
Type | Name | Description |
---|---|---|
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
Returns
Type | Description |
---|---|
Message |
CreatePeerOfferMessage(String, String, String, String, String)
Creates a peer "offer" message.
Declaration
public static Message CreatePeerOfferMessage(string tag, string offerJson, string remoteUserId, string remoteDeviceId, string remoteClientId)
Parameters
Type | Name | Description |
---|---|---|
System. |
tag | The tag. |
System. |
offerJson | The offer. |
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
Returns
Type | Description |
---|---|
Message |
CreatePeerRejectMessage(String, String, String, String)
Creates a "reject" message.
Declaration
public static Message CreatePeerRejectMessage(string remoteUserId, string remoteDeviceId, string remoteClientId, string remoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
System. |
remoteConnectionId | The remote connection identifier. |
Returns
Type | Description |
---|---|
Message |
CreateRegisterMessage(String, String, String, String, String, String, String, String[], String, String)
Creates a "register" message.
Declaration
public static Message CreateRegisterMessage(string applicationId, string userId, string userAlias, string deviceId, string deviceAlias, string clientId, string clientTag, string[] clientRoles, string region, string token)
Parameters
Type | Name | Description |
---|---|---|
System. |
applicationId | The application identifier. |
System. |
userId | The user identifier. |
System. |
userAlias | The user alias. |
System. |
deviceId | The device identifier. |
System. |
deviceAlias | The device alias. |
System. |
clientId | The client identifier. |
System. |
clientTag | The client tag. |
System. |
clientRoles | The client roles. |
System. |
region | The region. |
System. |
token | The auth token. |
Returns
Type | Description |
---|---|
Message |
CreateRtcpDataChannelSignallingActivationMessage(RtcpDataChannelSignallingActivation)
Creates a "activateInbandSignalling" message.
Declaration
public static Message CreateRtcpDataChannelSignallingActivationMessage(RtcpDataChannelSignallingActivation supportedMessageTypes)
Parameters
Type | Name | Description |
---|---|---|
Rtcp |
supportedMessageTypes |
Returns
Type | Description |
---|---|
Message |
CreateSfuOfferMessage(String, Nullable<Int32>, String, String)
Creates an SFU upstream "offer" message.
Declaration
public static Message CreateSfuOfferMessage(string layoutZone, int? layoutPriority, string tag, string offerJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
layoutZone | The connection LayoutZone |
System. |
layoutPriority | The connection LayoutPriority |
System. |
tag | The tag |
System. |
offerJson | The offer. |
Returns
Type | Description |
---|---|
Message |
CreateSfuOfferMessage(String, String)
Creates an SFU upstream "offer" message.
Declaration
public static Message CreateSfuOfferMessage(string tag, string offerJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
tag | The tag. |
System. |
offerJson | The offer. |
Returns
Type | Description |
---|---|
Message |
CreateSfuOfferMessage(String, String, String)
Creates an SFU downstream "offer" message.
Declaration
public static Message CreateSfuOfferMessage(string tag, string offerJson, string remoteMediaId)
Parameters
Type | Name | Description |
---|---|---|
System. |
tag | The tag. |
System. |
offerJson | The offer. |
System. |
remoteMediaId | The remote media identifier. |
Returns
Type | Description |
---|---|
Message |
CreateSfuOfferMessage(String, String, String, String, String, String)
Creates an SFU downstream "offer" message.
Declaration
public static Message CreateSfuOfferMessage(string tag, string offerJson, string remoteUserId, string remoteDeviceId, string remoteClientId, string remoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
System. |
tag | The tag. |
System. |
offerJson | The offer. |
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
System. |
remoteConnectionId | The remote connection identifier. |
Returns
Type | Description |
---|---|
Message |
CreateUnregisterMessage()
Creates an "unregister" message.
Declaration
public static Message CreateUnregisterMessage()
Returns
Type | Description |
---|---|
Message |
CreateUnregisterMessage(ClientReport, ChannelReport[])
Creates an "unregister" message.
Declaration
public static Message CreateUnregisterMessage(ClientReport clientReport, ChannelReport[] channelReports)
Parameters
Type | Name | Description |
---|---|---|
Client |
clientReport | The client report. |
Channel |
channelReports | The channel reports. |
Returns
Type | Description |
---|---|
Message |
CreateUpdateMessage(String)
Creates an "update" message.
Declaration
public static Message CreateUpdateMessage(string configJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
configJson | The config to send to the server. |
Returns
Type | Description |
---|---|
Message |
CreateUpdateMessage(String, String, String, String)
Creates an "update" message.
Declaration
public static Message CreateUpdateMessage(string configJson, string remoteUserId, string remoteDeviceId, string remoteClientId)
Parameters
Type | Name | Description |
---|---|---|
System. |
configJson | The config to send to the server. |
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
Returns
Type | Description |
---|---|
Message |
CreateUpdateMessage(String, String, String, String, String)
Creates an "update" message.
Declaration
public static Message CreateUpdateMessage(string configJson, string remoteUserId, string remoteDeviceId, string remoteClientId, string remoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
System. |
configJson | The config to send to the server. |
System. |
remoteUserId | The remote user identifier. |
System. |
remoteDeviceId | The remote device identifier. |
System. |
remoteClientId | The remote client identifier. |
System. |
remoteConnectionId | The remote connection identifier. |
Returns
Type | Description |
---|---|
Message |
FromJson(String)
Deserializes an instance from JSON.
Declaration
public static Message FromJson(string messageJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
messageJson | The JSON to deserialize. |
Returns
Type | Description |
---|---|
Message | The deserialized message. |
FromJsonArray(String)
Deserializes an array of instances from JSON.
Declaration
public static Message[] FromJsonArray(string messagesJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
messagesJson | The JSON to deserialize. |
Returns
Type | Description |
---|---|
Message[] | The deserialized messages. |
IsError(String)
Gets whether this message is an error of a particular type.
Declaration
public bool IsError(string errorType)
Parameters
Type | Name | Description |
---|---|---|
System. |
errorType | The error type. |
Returns
Type | Description |
---|---|
System. |
|
PropertiesToJson(Dictionary<String, String>)
Serializes properties to JSON.
Declaration
protected virtual void PropertiesToJson(Dictionary<string, string> jsonObject)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<System. |
jsonObject | The JSON object. |
PropertiesToJson(Dictionary<String, String>, Boolean)
Serializes properties to JSON.
Declaration
protected virtual void PropertiesToJson(Dictionary<string, string> jsonObject, bool forceTimestamp)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<System. |
jsonObject | The JSON object. |
System. |
forceTimestamp | Indicates whether timestamp must be included regardless of where serialization occurs. |
PropertyFromJson(String, String)
Deserializes a property from JSON.
Declaration
protected virtual void PropertyFromJson(string name, string valueJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name. |
System. |
valueJson | The value in JSON format. |
ToJson()
Serializes this instance to JSON.
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
System. |
ToJson(Message)
Serializes an instance to JSON.
Declaration
public static string ToJson(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message to serialize. |
Returns
Type | Description |
---|---|
System. |
The serialized JSON. |
ToJson(Message, Boolean)
Serializes an instance to JSON and forces timestamp regardless of what generates Json.
Declaration
public static string ToJson(Message message, bool forceTimestamp)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message to serialize. |
System. |
forceTimestamp | Indicates whether timestamp must be included regardless of where serialization occurs. |
Returns
Type | Description |
---|---|
System. |
The serialized JSON. |
ToJsonArray(Message[])
Serializes an array of instances to JSON.
Declaration
public static string ToJsonArray(Message[] messages)
Parameters
Type | Name | Description |
---|---|---|
Message[] | messages | The messages to serialize. |
Returns
Type | Description |
---|---|
System. |
The serialized JSON. |