本文整理汇总了C#中IGitHubClient类的典型用法代码示例。如果您正苦于以下问题:C# IGitHubClient类的具体用法?C# IGitHubClient怎么用?C# IGitHubClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IGitHubClient类属于命名空间,在下文中一共展示了IGitHubClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ObservableFollowersClient
/// <summary>
/// Initializes a new User Followers API client.
/// </summary>
/// <param name="client">An <see cref="IGitHubClient" /> used to make the requests</param>
public ObservableFollowersClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_client = client.User.Followers;
_connection = client.Connection;
}
示例2: ObservableOrganizationsClient
public ObservableOrganizationsClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_client = client.Organization;
_connection = client.Connection;
}
示例3: ObservableRepositoriesClient
public ObservableRepositoriesClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_client = client.Repository;
_connection = client.Connection;
Status = new ObservableCommitStatusClient(client);
Hooks = new ObservableRepositoryHooksClient(client);
Forks = new ObservableRepositoryForksClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
RepoCollaborators = new ObservableRepoCollaboratorsClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
Collaborator = new ObservableRepoCollaboratorsClient(client);
Deployment = new ObservableDeploymentsClient(client);
Statistics = new ObservableStatisticsClient(client);
PullRequest = new ObservablePullRequestsClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
RepositoryComments = new ObservableRepositoryCommentsClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
Comment = new ObservableRepositoryCommentsClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
Commits = new ObservableRepositoryCommitsClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
Commit = new ObservableRepositoryCommitsClient(client);
Release = new ObservableReleasesClient(client);
DeployKeys = new ObservableRepositoryDeployKeysClient(client);
Content = new ObservableRepositoryContentsClient(client);
Merging = new ObservableMergingClient(client);
Page = new ObservableRepositoryPagesClient(client);
}
示例4: ObservableReferencesClient
public ObservableReferencesClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_reference = client.GitDatabase.Reference;
_connection = client.Connection;
}
示例5: ObservablePullRequestReviewCommentReactionsClient
public ObservablePullRequestReviewCommentReactionsClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_client = client.Reaction.PullRequestReviewComment;
_connection = client.Connection;
}
示例6: LogInViewModel
public LogInViewModel(IScreen host, IGitHubClient ghClient)
{
this.HostScreen = host;
this.GHClient = ghClient;
// Only allow a submit when the user name is valid
var validStuffTyped = this.WhenAny(x => x.UserName, x => x.Password,
(user, pass) => !string.IsNullOrWhiteSpace(user.Value) && !string.IsNullOrWhiteSpace(pass.Value));
Submit = new ReactiveCommand(validStuffTyped);
//todo: better make a cancel or else you'll get very mad!
//Submit.Subscribe(_ =>
//{
// GHClient.Authorization.Create();
// //try
// //{
// // //if (user != null)
// // //{
// // // Insert the user into the cache
// // BlobCache.UserAccount.InsertObject<User>("MyUser", user);
// // //}
// //}
// //catch (AuthorizationException authEx)
// //{
// // Debug.Print("CRAP!");
// // Debug.Print(authEx.Message);
// // Debug.Print(authEx.StackTrace);
// //}
//});
MessageBus.Current.RegisterMessageSource(Submit);
}
示例7: ObservableSshKeysClient
public ObservableSshKeysClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_client = client.SshKey;
_connection = client.Connection;
}
示例8: ObservableRepoCollaboratorsClient
/// <summary>
/// Initializes a new GitHub Repo Collaborators API client.
/// </summary>
/// <param name="client">An IGitHubClient client.</param>
public ObservableRepoCollaboratorsClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_client = client.Repository.Collaborator;
_connection = client.Connection;
}
示例9: InstallController
public InstallController(IConfiguration configuration, IGitHubClient gitHubClient)
{
if (configuration == null) throw new ArgumentNullException("configuration");
if (gitHubClient == null) throw new ArgumentNullException("gitHubClient");
_configuration = configuration;
_gitHubClient = gitHubClient;
}
示例10: CreateRepository
static Repository CreateRepository(IGitHubClient github)
{
var repoName = Helper.MakeNameWithTimestamp("create-hooks-test");
var repository = github.Repository.Create(new NewRepository(repoName) { AutoInit = true });
return repository.Result;
}
示例11: ObservableDeploymentStatusClient
public ObservableDeploymentStatusClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_client = client.Deployment.Status;
_connection = client.Connection;
}
示例12: ObservableIssueReactionsClient
public ObservableIssueReactionsClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_client = client.Reaction.Issue;
_connection = client.Connection;
}
示例13: ObservableUserEmailsClient
public ObservableUserEmailsClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_client = client.User.Email;
_connection = client.Connection;
}
示例14: ObservableReleasesClient
public ObservableReleasesClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_client = client.Release;
_connection = client.Connection;
}
示例15: ObservableIssuesLabelsClient
public ObservableIssuesLabelsClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
_connection = client.Connection;
_client = client.Issue.Labels;
}