예제 #1
0
 public static TextMessage FromFile(string filePath)
 {
     var message = System.IO.File.ReadAllText(filePath);
     // bit of a hack passing the message into the fileName of
     // the DocumentBase class like this, since the message tag needs text instead of a binary
     var textMsg = new TextMessage(message, new byte[0]);
     return textMsg;
 }
예제 #2
0
 public static TextMessage FromText(string messageText)
 {
     var textMsg = new TextMessage(messageText, new byte[0]);
     return textMsg;
 }
예제 #3
0
 public static TextMessage FromBase64String(string encodedMessageTextData)
 {
     var messageText = Encoding.UTF8.GetString(Convert.FromBase64String(encodedMessageTextData));
     var textMsg = new TextMessage(messageText, new byte[0]);
     return textMsg;
 }