public GitHubScopedProcessingService( IGitHubApiService gitHubApiService, IGitHubRepository gitHubRepository) { _gitHubApiService = gitHubApiService; _gitHubRepository = gitHubRepository; }
public static async Task <List <string> > Run( [ActivityTrigger] IDurableActivityContext context, [Inject] IGitHubApiService gitHubApiService, ILogger log) { return(await gitHubApiService.GetUserRepositoryList()); }
public async Task <IActionResult> Get(string user) { try { string valorJSON = _cacheRepository.GetString(user); if (!string.IsNullOrEmpty(valorJSON)) { _logger.LogInformation($"Response use cache."); return(Ok(valorJSON)); } IGitHubApiService gitHubApiService = RestService.For <IGitHubApiService>("https://api.github.com/"); UserResponse userResponse = await gitHubApiService.GetUser(user); valorJSON = JsonSerializer.Serialize(userResponse); _cacheRepository.SetString(user, valorJSON, 10); _logger.LogInformation($"Response use network."); return(Ok(valorJSON)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ImportService(IGitHubApiService gitHubApiService, IRepoSettingsStore repoSettingsStore, IOwnerSettingsStore ownerSettingsStore) { _gitHubApiService = gitHubApiService; _repoSettingsStore = repoSettingsStore; _ownerSettingsStore = ownerSettingsStore; }
/// <summary> /// Initializes a new instance of the <see cref="HomeController"/> class. /// </summary> /// <param name="service"><see cref="IGitHubApiService"/> instance.</param> public HomeController(IGitHubApiService service) { if (service == null) { throw new ArgumentNullException(nameof(service)); } this._service = service; }
public static async Task <RepoViewCount> Run( [ActivityTrigger] IDurableActivityContext context, [Inject] IGitHubApiService gitHubApiService, ILogger log) { var repoName = context.GetInput <string>(); return(await gitHubApiService.GetRepositoryViewCount(repoName)); }
public void Given_NullParameter_Constructor_ShouldThrow_ArgumentNullException() { // Arrange IGitHubApiService service = null; // Action Action action = () => { var controller = new HomeController(service); }; // Assert action.ShouldThrow <ArgumentNullException>(); }
public CreatePullRequestTask( IStringLocalizer <CommitFileTask> localizer, IWorkflowExpressionEvaluator expressionEvaluator, IGitHubApiService gitHubApiService, ILogger <CreateBranchTask> logger ) { S = localizer; _expressionEvaluator = expressionEvaluator; _gitHubApiService = gitHubApiService; _logger = logger; }
public UsersController(IGitHubApiService apiService) { _apiService = apiService; }
public GetRepositoryViewCountCore(IGitHubApiService gitHubApiService) { _gitHubApiService = gitHubApiService; }
public AppRepositoryUpdateService(IGitHubApiService gitHubApiService, IAppRepository appRepository) { _gitHubApiService = gitHubApiService; _appRepository = appRepository; }
/// <summary> /// Initializes a new instance of the <see cref="GitHubApiServiceTest"/> class. /// </summary> /// <param name="fixture"><see cref="GitHubApiServiceFixture"/> instance.</param> public GitHubApiServiceTest(GitHubApiServiceFixture fixture) { this._helper = fixture.HttpClientHelper; this._service = fixture.GitHubApiService; }
public SelectTokenViewComponent(IGitHubApiService apiService) { _apiService = apiService; }
public RepositoriesComparisonControl(IGitHubApiService gitHubService) { InitializeComponent(); GitHubService = gitHubService; }
public GitHubController(IGitHubApiService gitHubApiService) { this.gitHubApiService = gitHubApiService; }
public GetUserRepositoryList(IGitHubApiService gitHubApiService) { _gitHubApiService = gitHubApiService; }
public RepositorySelectorListViewComponent(IGitHubApiService gitHubApiService) { _gitHubApiService = gitHubApiService; }