Beispiel #1
0
        private EmailBody ParseRawBody(JObject json)
        {
            var    body  = new RawEmailBody();
            JToken value = null;

            if (json.TryGetValue("content", out value) == true && value.Type != JTokenType.Null)
            {
                body.Content = value.ToString();
            }
            return(body);
        }
Beispiel #2
0
 private void WriteRawBody(JsonWriter writer, RawEmailBody raw)
 {
     if (raw == null)
     {
         writer.WriteProperty("body").WriteNull();
     }
     else
     {
         writer
         .WriteProperty("body")
         .StartObject()
         .WriteProperty("content", raw.Content)
         .WriteProperty("ishtml", raw.IsHtml)
         .EndObject();
     }
 }
 private EmailBody ParseRawBody(JObject json)
 {
     var body = new RawEmailBody();
     JToken value = null;
     if (json.TryGetValue("content", out value) == true && value.Type != JTokenType.Null)
         body.Content = value.ToString();
     return body;
 }
 private void WriteRawBody(JsonWriter writer, RawEmailBody raw)
 {
     if (raw == null)
         writer.WriteProperty("body").WriteNull();
     else
         writer
             .WriteProperty("body")
             .StartObject()
                 .WriteProperty("content", raw.Content)
                 .WriteProperty("ishtml", raw.IsHtml)
             .EndObject();
 }