public PostCommentService( IOptions <WebConfiguration> config, ICommentFactory commentFactory, IPullRequestService pullRequestService) { _config = config?.Value ?? throw new ArgumentNullException(nameof(config)); _commentFactory = commentFactory ?? throw new ArgumentNullException(nameof(commentFactory)); _pullRequestService = pullRequestService ?? throw new ArgumentNullException(nameof(pullRequestService)); }
public PullRequestService( IOptions <WebConfiguration> config, ISerializerFactory serializerFactory, IGitHubClientFactory githubFactory) { if (serializerFactory is null) { throw new ArgumentNullException(nameof(serializerFactory)); } if (githubFactory is null) { throw new ArgumentNullException(nameof(githubFactory)); } _config = config?.Value ?? throw new ArgumentNullException(nameof(config)); _serializer = serializerFactory.BuildSerializer(); _github = githubFactory.CreateClient(); }
public GitHubClientFactory(IOptions <WebConfiguration> config) { _config = config?.Value ?? throw new ArgumentNullException(nameof(config)); }