Beispiel #1
0
        private static List <CryptocurrencyApi> GetEnabledApis(CryptocurrencyType cryptocurrencyType, string columnToCheck)
        {
            var query = String.Format("SELECT TypeInt FROM CryptocurrencyApis WHERE Enabled = 1 AND TypeInt IN " +
                                      "(SELECT TypeInt FROM CryptocurrencyApiOperations WHERE {1} = 1 AND CryptocurrencyTypeId = {0})", (int)cryptocurrencyType, columnToCheck);
            var list = TableHelper.GetStringListFromRawQuery(query);

            var result = new List <CryptocurrencyApi>();

            foreach (var api in list)
            {
                result.Add(CryptocurrencyApiFactory.Get((CryptocurrencyAPIProvider)Convert.ToInt32(api)));
            }

            return(result);
        }
Beispiel #2
0
 public static CryptocurrencyApi Get(CryptocurrencyAPIProvider cryptocurrencyApiProvider)
 {
     return(CryptocurrencyApiFactory.Get(cryptocurrencyApiProvider));
 }