using System.Collections.Generic; namespace ChatComponents { public class PartialText { /// User's message public readonly string text; /// Creates a partial text message with all variables text can have. /// Use [TextMessage] to create a full message. /// You can use [TextMessage.fromPartial] constructor to create a full /// message from a partial one. public PartialText( string text ) { this.text = text; } /// Creates a partial text message from a map (decoded JSON). private PartialText fromJson(Dictionary json) { return new PartialText(json["text"] as string); } /// Converts a partial text message to the map representation, encodable to JSON. private Dictionary toJson() { return new Dictionary { {"text", text} }; } } }