Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 public GitHubClientFactory(IOptions <WebConfiguration> config)
 {
     _config = config?.Value ?? throw new ArgumentNullException(nameof(config));
 }