static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            IDBContext    dBContext    = new DBContext();
            IRepoClient   repoClient   = new RepoClient(dBContext);
            IListClient   listClient   = new ListClient();
            ILireFichiers lireFichiers = new LireFichiers();

            EtapeFichier etapeFichier1 = new EtapeFichier(repoClient, listClient, lireFichiers);

            etapeFichier1.ExecuterEtape();
        }
        static void Main(string[] args)
        {
            //Model1 dbContext = new Model1();
            //System.Console.WriteLine(dbContext.Clients.Count());

            SqliteDbContext dbContext1 = new SqliteDbContext();

            System.Console.WriteLine(dbContext1.Clients.Count());
            System.Console.WriteLine(dbContext1.Issues.Count());


            RepoClient repoClient = new RepoClient(dbContext1);

            repoClient.GetAll().ToList().ForEach(c => System.Console.WriteLine("{0} {1}", c.Id, c.Name));
        }
Exemple #3
0
        public void Connect(string login = null, string pwd = null)
        {
            if (!string.IsNullOrEmpty(login))
            {
                _login = login;
            }
            if (!string.IsNullOrEmpty(pwd))
            {
                _password = pwd;
            }

            if (!string.IsNullOrEmpty(_login) && !string.IsNullOrEmpty(_password))
            {
                _client       = BitbucketClient.WithBasicAuthentication(_login, _password);
                _clientCommit = new ClientCommit(_client);
                _clientRepo   = new RepoClient(_client);
            }
            ConnectionChanged?.Invoke(null);
        }
Exemple #4
0
 public GitHubRepositories GitRepositoriesService(string id)
 {
     try
     {
         var client          = RepoClient.RepoClientConnection();
         var repoTierOne     = GenerateTierOneRepoList(client, id);
         var repoTierTwo     = GenerateTierTwoRepoList(client, repoTierOne.Repositories);
         var finalRepoResult = (from repo in repoTierTwo select repo.Repositories).FirstOrDefault();
         var repoTierThree   = GenerateTierThreeRepoList(client, finalRepoResult);
         return(new GitHubRepositories()
         {
             RepositoriesTierOne = repoTierOne,
             RepositoriesTierTwo = repoTierTwo,
             RepositoriesTierThree = repoTierThree
         });
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception);
         return(new GitHubRepositories());
     }
 }
Exemple #5
0
 public DatabaseController(ILogger <WebhookController> logger, RepoClient repoClient, Database database)
 {
     _Logger     = logger;
     _RepoClient = repoClient;
     _Database   = database;
 }
 public WebhookController(ILogger <WebhookController> logger, RepoClient repoClient, Database database)
 {
     this.logger     = logger;
     this.repoClient = repoClient;
     this.database   = database;
 }
        public IHttpActionResult GetOpenIssues()
        {
            RepoClient rc = new RepoClient();

            return(Ok(rc.GetRepoIssues()));
        }
Exemple #8
0
 public GitHubApiClient(string source, string target)
 {
     _Target     = target;
     _RepoClient = new RepoClient(source);
     _Database   = new Database(_RepoClient);
 }