Files
octokit.net/Octokit/Clients/ApiClient.cs
Itai Bar-Haim 4e804f61a6 Prefer using nameof(x) over literal "x" (#1781)
* updated XML docs and added some missing bits.

* prefer nameof(x) over literal "x"
2018-03-07 20:43:10 +10:00

35 lines
1.1 KiB
C#

namespace Octokit
{
/// <summary>
/// Base class for an API client.
/// </summary>
public abstract class ApiClient
{
/// <summary>
/// Initializes a new API client.
/// </summary>
/// <param name="apiConnection">The client's connection</param>
protected ApiClient(IApiConnection apiConnection)
{
Ensure.ArgumentNotNull(apiConnection, nameof(apiConnection));
ApiConnection = apiConnection;
Connection = apiConnection.Connection;
}
/// <summary>
/// Gets the API client's connection.
/// </summary>
/// <value>
/// The API client's connection
/// </value>
protected IApiConnection ApiConnection { get; private set; }
/// <summary>
/// Returns the underlying <see cref="IConnection"/> used by the <see cref="IApiConnection"/>. This is useful
/// for requests that need to access the HTTP response and not just the response model.
/// </summary>
protected IConnection Connection { get; private set; }
}
}