mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
* Added a convention test to detect a model constructor exposing all properties * add ctors to classes where they are missing * rename ctor parameters that dont match properties * add missing parameters to existing ctors * add specific PunchCard ctor to allow mocking, and update test to resolve call ambiguity * Added base class properties to the convention test Added member exclusion attribute * Updated newly offending classes 2 excludes and 2 ctors * rename exclusion attribute to be a bit shorter
33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
|
|
namespace Octokit
|
|
{
|
|
/// <summary>
|
|
/// Represents an oauth access given to a particular application.
|
|
/// </summary>
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
public class ApplicationAuthorization : Authorization
|
|
{
|
|
// TODO: I'd love to not need this
|
|
public ApplicationAuthorization()
|
|
{
|
|
}
|
|
|
|
public ApplicationAuthorization(int id, string url, Application application, string tokenLastEight, string hashedToken, string fingerprint, string note, string noteUrl, DateTimeOffset createdAt, DateTimeOffset updateAt, string[] scopes, string token)
|
|
: base(id, url, application, tokenLastEight, hashedToken, fingerprint, note, noteUrl, createdAt, updateAt, scopes)
|
|
{
|
|
Token = token;
|
|
}
|
|
|
|
/// <summary>
|
|
/// The oauth token (be careful with these, they are like passwords!).
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This will return only return a value the first time
|
|
/// the authorization is created. All subsequent API calls
|
|
/// (for example, 'get' for an authorization) will return `null`
|
|
/// </remarks>
|
|
public string Token { get; private set; }
|
|
}
|
|
} |