Exemplo n.º 1
0
        public static async Task <List <CmcCoin> > GetCmcCoins_(this IGithub service)
        {
            try {
                var response = await service.GetCmcCoins();

                return(response);

                //return JsonSerializer.Deserialize<List<CoinGeckoCoin>>(response.ToString());

                //coinList.Sort((x, y) => x.Symbol.CompareTo(y.Symbol));

                // Save on Local Storage, and save the Date
                await LocalStorageHelper.SaveObject("CoinList", response);

                //App._LocalSettings.Set(UserSettings.CoinListDate, DateTime.Today.ToOADate());

                return(new List <CmcCoin>());
            }
            catch (Exception ex) {
                //return new List<CmcCoin>();
                await new MessageDialog(ex.Message).ShowAsync();
                return(new List <CmcCoin>()
                {
                    new CmcCoin()
                    {
                        id = 1,
                        name = "Erro",
                        symbol = "ERR",
                        rank = 1
                    }
                });
            }
        }
 public UserController(IMethod _SMethod, SRedisService _SRedisService,
                       IGithub _SGithub, IUser _SUser)
     : base(_SMethod, _SRedisService)
 {
     this._SGithub = _SGithub;
     this._SUser   = _SUser;
 }
Exemplo n.º 3
0
 public PackageUpdater(
     IGithub github,
     INuKeeperLogger logger,
     UserSettings settings)
 {
     _github   = github;
     _logger   = logger;
     _settings = settings;
 }
 public GithubRepositoryDiscovery(
     IGithub github,
     ModalSettings settings,
     INuKeeperLogger logger)
 {
     _github   = github;
     _settings = settings;
     _logger   = logger;
 }
Exemplo n.º 5
0
 public PackageUpdater(
     IGithub github,
     IUpdateRunner localUpdater,
     INuKeeperLogger logger,
     ModalSettings modalSettings)
 {
     _github        = github;
     _updateRunner  = localUpdater;
     _logger        = logger;
     _modalSettings = modalSettings;
 }
Exemplo n.º 6
0
 public GithubEngine(
     IGithub github,
     IGithubRepositoryDiscovery repositoryDiscovery,
     IGithubRepositoryEngine repositoryEngine,
     GithubAuthSettings settings,
     IFolderFactory folderFactory)
 {
     _github = github;
     _repositoryDiscovery = repositoryDiscovery;
     _repositoryEngine    = repositoryEngine;
     _githubToken         = settings.Token;
     _folderFactory       = folderFactory;
 }
Exemplo n.º 7
0
 public ExistingBranchFilter(IGithub github, INuKeeperLogger logger)
 {
     _github = github;
     _logger = logger;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="interest">Interest interface</param>
 public GithubController(IGithub github)
 {
     _github = github;
 }
Exemplo n.º 9
0
 public RepositoryFilter(IGithub githubClient, INuKeeperLogger logger)
 {
     _githubClient = githubClient;
     _logger       = logger;
 }
Exemplo n.º 10
0
 public ForkFinder(IGithub github, UserSettings settings, INuKeeperLogger logger)
 {
     _github   = github;
     _forkMode = settings.ForkMode;
     _logger   = logger;
 }
Exemplo n.º 11
0
 private static IGithubRepositoryDiscovery MakeGithubRepositoryDiscovery(IGithub github, ModalSettings settings)
 {
     return(new GithubRepositoryDiscovery(github, settings, new NullNuKeeperLogger()));
 }
 private static IGithubRepositoryDiscovery MakeGithubRepositoryDiscovery(IGithub github, ModalSettings settings)
 {
     return(new GithubRepositoryDiscovery(github, settings, Substitute.For <INuKeeperLogger>()));
 }