コード例 #1
0
 /// <summary>
 /// Sends a POST to '/api/user/{userId}/mailmessages'
 /// </summary>
 /// <param name="userId">a path parameter (no description)</param>
 /// <param name="model">a body parameter (no description)</param>
 /// <returns></returns>
 public static RestOperation EnqueueMailMessage(string userId, Message model)
 {
     return new RestOperation("POST", "api/user/" + userId + "/mailmessages")
         {
             Content = model
         };
 }
コード例 #2
0
 public Message Clone(bool includeLocalProperties)
 {
     var c = new Message
             {
                 Body = Body,
                 Subject = Subject,
                 To = To.Select(x=>x.Clone(includeLocalProperties)).ToList(),
             };
     CopyExtraPropertiesToClone(c, includeLocalProperties);
     return c;
 }
コード例 #3
0
partial         void CopyExtraPropertiesToClone(Message clone, bool includeLocalProperties);
コード例 #4
0
		/// <summary>
        /// Sends a POST to '/api/user/{userId}/mailmessages'  (asynchronous)
        /// </summary>
        /// <param name="userId">a path parameter (no description)</param>
        /// <param name="model">a body parameter (no description)</param>
        /// <returns></returns>
        public virtual async Task<QueuedMessage> EnqueueMailMessageAsync(string userId, Message model)
        {
            var operation = Operations.EnqueueMailMessage(userId, model);
			var response = await _client.SendAsync(operation.BuildRequest(_client));
			EnsureSuccess(response);
			var result = await response.Content.ReadAsAsync<QueuedMessage>();
			return result;
						
		}