diff --git a/CHANGELOG.md b/CHANGELOG.md index 590b5ae5a..7fe081c6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## [9.3.0] - 2017-5-16 +## Update +- PR #456: Fixed #403 Implements an interface for mocking and DI +- Thanks to [Nate](https://github.com/nate-fr) for the PR! + ## [9.2.1] - 2017-5-16 ## Fix - PR #457: Tos, Bccs and CCs fields could be null diff --git a/nuspec/Sendgrid.9.2.1.nuspec b/nuspec/Sendgrid.9.3.0.nuspec similarity index 92% rename from nuspec/Sendgrid.9.2.1.nuspec rename to nuspec/Sendgrid.9.3.0.nuspec index a3887bfc2..1504be606 100644 --- a/nuspec/Sendgrid.9.2.1.nuspec +++ b/nuspec/Sendgrid.9.3.0.nuspec @@ -2,7 +2,7 @@ Sendgrid - 9.2.1 + 9.3.0 SendGrid Elmer Thomas,SendGrid DX Team https://github.com/sendgrid/sendgrid-csharp/blob/master/MIT.LICENSE @@ -11,9 +11,9 @@ false C# client library and examples for using SendGrid API's to send mail and access Web API v3 endpoints with .NET Standard 1.3 and .NET Core support. Github repo located at : https://github.com/sendgrid/sendgrid-csharp C# client library and examples for using SendGrid API's to send mail and access Web API v3 endpoints with .NET Standard 1.3 and .NET Core support. - ## Fix -- PR #457: Tos, Bccs and CCs fields could be null -- Thanks to [Jef Statham](https://github.com/JefStat) for the PR! + ## Update +- PR #456: Fixed #403 Implements an interface for mocking and DI +- Thanks to [Nate](https://github.com/nate-fr) for the PR! SendGrid, Inc. 2017 SendGrid Email Mail Microsoft Azure Transactional .NET Core diff --git a/src/SendGrid/ISendGridClient.cs b/src/SendGrid/ISendGridClient.cs index 8dfdfd318..3a57447b7 100644 --- a/src/SendGrid/ISendGridClient.cs +++ b/src/SendGrid/ISendGridClient.cs @@ -3,73 +3,71 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using System; - namespace SendGrid { - using System.Collections.Generic; - using System.Net.Http; - using System.Net.Http.Headers; - using System.Threading; - using System.Threading.Tasks; - using Helpers.Mail; + using Helpers.Mail; + using System.Collections.Generic; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Threading; + using System.Threading.Tasks; - /// - /// A HTTP client wrapper for interacting with SendGrid's API - /// - public interface ISendGridClient - { - /// - /// Gets or sets the path to the API resource. - /// - string UrlPath { get; set; } + /// + /// A HTTP client wrapper for interacting with SendGrid's API + /// + public interface ISendGridClient + { + /// + /// Gets or sets the path to the API resource. + /// + string UrlPath { get; set; } - /// - /// Gets or sets the API version. - /// - string Version { get; set; } + /// + /// Gets or sets the API version. + /// + string Version { get; set; } - /// - /// Gets or sets the request media type. - /// - string MediaType { get; set; } + /// + /// Gets or sets the request media type. + /// + string MediaType { get; set; } - /// - /// Add the authorization header, override to customize - /// - /// Authorization header - /// Authorization value to add to the header - AuthenticationHeaderValue AddAuthorization( KeyValuePair header ); + /// + /// Add the authorization header, override to customize + /// + /// Authorization header + /// Authorization value to add to the header + AuthenticationHeaderValue AddAuthorization(KeyValuePair header); - /// - /// Make the call to the API server, override for testing or customization - /// - /// The parameters for the API call - /// Cancel the asynchronous call - /// Response object - Task MakeRequest( HttpRequestMessage request, CancellationToken cancellationToken = default( CancellationToken ) ); + /// + /// Make the call to the API server, override for testing or customization + /// + /// The parameters for the API call + /// Cancel the asynchronous call + /// Response object + Task MakeRequest(HttpRequestMessage request, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Prepare for async call to the API server - /// - /// HTTP verb - /// JSON formatted string - /// JSON formatted query paramaters - /// The path to the API endpoint. - /// Cancel the asynchronous call. - /// Response object - /// The method will NOT catch and swallow exceptions generated by sending a request - /// through the internal http client. Any underlying exception will pass right through. - /// In particular, this means that you may expect - /// a TimeoutException if you are not connected to the internet. - Task RequestAsync( SendGridClient.Method method, string requestBody = null, string queryParams = null, string urlPath = null, CancellationToken cancellationToken = default( CancellationToken ) ); + /// + /// Prepare for async call to the API server + /// + /// HTTP verb + /// JSON formatted string + /// JSON formatted query paramaters + /// The path to the API endpoint. + /// Cancel the asynchronous call. + /// Response object + /// The method will NOT catch and swallow exceptions generated by sending a request + /// through the internal http client. Any underlying exception will pass right through. + /// In particular, this means that you may expect + /// a TimeoutException if you are not connected to the internet. + Task RequestAsync(SendGridClient.Method method, string requestBody = null, string queryParams = null, string urlPath = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Make a request to send an email through SendGrid asychronously. - /// - /// A SendGridMessage object with the details for the request. - /// Cancel the asychronous call. - /// A Response object. - Task SendEmailAsync( SendGridMessage msg, CancellationToken cancellationToken = default( CancellationToken ) ); - } -} \ No newline at end of file + /// + /// Make a request to send an email through SendGrid asychronously. + /// + /// A SendGridMessage object with the details for the request. + /// Cancel the asychronous call. + /// A Response object. + Task SendEmailAsync(SendGridMessage msg, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SendGrid/Properties/AssemblyInfo.cs b/src/SendGrid/Properties/AssemblyInfo.cs index 6f8f457b7..a1e44baa8 100644 --- a/src/SendGrid/Properties/AssemblyInfo.cs +++ b/src/SendGrid/Properties/AssemblyInfo.cs @@ -22,4 +22,4 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("377c20e4-2297-488f-933b-fb635c56d8fc")] -[assembly: AssemblyInformationalVersion("9.2.1")] +[assembly: AssemblyInformationalVersion("9.3.0")] diff --git a/src/SendGrid/SendGridClient.cs b/src/SendGrid/SendGridClient.cs index 114dc6dec..6197967ce 100644 --- a/src/SendGrid/SendGridClient.cs +++ b/src/SendGrid/SendGridClient.cs @@ -21,7 +21,7 @@ namespace SendGrid /// A HTTP client wrapper for interacting with SendGrid's API /// public class SendGridClient : ISendGridClient - { + { /// /// Gets or sets the path to the API resource. /// diff --git a/src/SendGrid/project.json b/src/SendGrid/project.json index eac1f6012..2b118bc85 100644 --- a/src/SendGrid/project.json +++ b/src/SendGrid/project.json @@ -48,5 +48,5 @@ } } }, - "version": "9.2.1" + "version": "9.3.0" }