partial void CopyExtraPropertiesToClone(MailSenderSettings clone, bool includeLocalProperties);
public MailSenderSettings Clone(bool includeLocalProperties) { var c = new MailSenderSettings { EmailPrefix = EmailPrefix, Enabled = Enabled, ErrorMessage = ErrorMessage, FromAddress = FromAddress, HostName = HostName, IsValid = IsValid, Password = Password, Port = Port, SSL = SSL, Timeout = Timeout, Type = Type, UserName = UserName, }; CopyExtraPropertiesToClone(c, includeLocalProperties); return c; }
/// <summary> /// Sends a PUT to '/api/mailsender/default/settings' /// </summary> /// <param name="model">a body parameter (no description)</param> /// <returns></returns> public virtual MailSenderSettings UpdateMailSenderSettings(MailSenderSettings model) { var operation = Operations.UpdateMailSenderSettings(model); var response = _client.SendAsync(operation.BuildRequest(_client)).Result; EnsureSuccess(response); var result = response.Content.ReadAsAsync<MailSenderSettings>().Result; return result; }
/// <summary> /// Sends a PUT to '/api/mailsender/default/settings' (asynchronous) /// </summary> /// <param name="model">a body parameter (no description)</param> /// <returns></returns> public virtual async Task<MailSenderSettings> UpdateMailSenderSettingsAsync(MailSenderSettings model) { var operation = Operations.UpdateMailSenderSettings(model); var response = await _client.SendAsync(operation.BuildRequest(_client)); EnsureSuccess(response); var result = await response.Content.ReadAsAsync<MailSenderSettings>(); return result; }
/// <summary> /// Sends a PUT to '/api/mailsender/default/settings' /// </summary> /// <param name="model">a body parameter (no description)</param> /// <returns></returns> public static RestOperation UpdateMailSenderSettings(MailSenderSettings model) { return new RestOperation("PUT", "api/mailsender/default/settings") { Content = model }; }