public void TestMethod6() { String s = "0101"; FA2 fa = new FA2(); bool? result = fa.Run(s); Assert.IsTrue(result == true); }
public void TestMethod8() { String s = "00011"; FA2 fa = new FA2(); bool? result = fa.Run(s); Assert.IsTrue(result == false); }
public static void SubQuery2() { FA2 fe = new FA2(GetConStr()); IEnumerable<FASubGroup> c = from n in fe.FASubGroup select n; foreach (FASubGroup r in c) { Console.WriteLine(r.S_CODE + " " + r.S_DESC); } }
public static ReceiveViewModel CreateViewModel( IAtomexApp app, Currency currency) { return(currency switch { BitcoinBasedCurrency _ => new ReceiveViewModel(app, currency), ERC20 _ => new ReceiveViewModel(app, currency), Ethereum _ => new EthereumReceiveViewModel(app, currency), NYX _ => new ReceiveViewModel(app, currency), FA2 _ => new ReceiveViewModel(app, currency), FA12 _ => new ReceiveViewModel(app, currency), Tezos _ => new TezosReceiveViewModel(app, currency), _ => throw new NotSupportedException($"Can't create receive view model for {currency.Name}. This currency is not supported."), });
public static SendViewModel CreateViewModel( IAtomexApp app, Currency currency) { return(currency switch { BitcoinBasedCurrency _ => (SendViewModel) new BitcoinBasedSendViewModel(app, currency), ERC20 _ => (SendViewModel) new Erc20SendViewModel(app, currency), Ethereum _ => (SendViewModel) new EthereumSendViewModel(app, currency), NYX _ => (SendViewModel) new Fa12SendViewModel(app, currency), FA2 _ => (SendViewModel) new Fa12SendViewModel(app, currency), FA12 _ => (SendViewModel) new Fa12SendViewModel(app, currency), Tezos _ => (SendViewModel) new TezosSendViewModel(app, currency), _ => throw new NotSupportedException($"Can't create send view model for {currency.Name}. This currency is not supported."), });
public void AA1b() { Question.GetComponent <Text>().text += "\n\nФин: " + AA1.GetComponentInChildren <Text>().text; Question.GetComponent <Text>().text += "\n\nВот тебе моя первая загадка: все обходят это место: здесь земля как будто тесто; здесь осока " + "кочки, мхи. Нет опоры для ноги. Ты ответ мне свой скажи."; AA1.gameObject.SetActive(false); BA4.gameObject.SetActive(false); TA1.gameObject.SetActive(true); FA1.gameObject.SetActive(true); FA2.gameObject.SetActive(true); TA1.GetComponentInChildren <Text>().text = "Эм..это болото?"; FA1.GetComponentInChildren <Text>().text = "Конечно же это зыбучие пески!"; FA2.GetComponentInChildren <Text>().text = "Похоже на дороги в России."; }
public void FA2b() { Question.GetComponent <Text>().text += "\n\nФин: " + FA2.GetComponentInChildren <Text>().text; Question.GetComponent <Text>().text += "\n\nИзвини, но в этот раз ты не прав. Я задам тебе вторую загадку, ответишь на неё, получишь немного" + " информации: зимой и летом одним цветом. Подумай внимательно."; TA1.gameObject.SetActive(false); FA1.gameObject.SetActive(false); FA2.gameObject.SetActive(false); TA3.gameObject.SetActive(true); FA5.gameObject.SetActive(true); FA6.gameObject.SetActive(true); TA3.GetComponentInChildren <Text>().text = "Ну, это может быть зомби."; FA5.GetComponentInChildren <Text>().text = "Какие то детские у тебя загадки, старик. Все знают, что это ёлка!"; FA6.GetComponentInChildren <Text>().text = "Деньги."; }
public static ICurrencySwap Create( Currency currency, IAccount account, ISwapClient swapClient) { return(currency switch { BitcoinBasedCurrency _ => (ICurrencySwap) new BitcoinBasedSwap( account: account.GetCurrencyAccount <BitcoinBasedAccount>(currency.Name), swapClient: swapClient, currencies: account.Currencies), ERC20 _ => (ICurrencySwap) new ERC20Swap( account: account.GetCurrencyAccount <ERC20Account>(currency.Name), ethereumAccount: account.GetCurrencyAccount <EthereumAccount>("ETH"), swapClient: swapClient, currencies: account.Currencies), Atomex.Ethereum _ => (ICurrencySwap) new EthereumSwap( account: account.GetCurrencyAccount <EthereumAccount>(currency.Name), swapClient: swapClient, currencies: account.Currencies), NYX _ => (ICurrencySwap) new NYXSwap( account: account.GetCurrencyAccount <NYXAccount>(currency.Name), tezosAccount: account.GetCurrencyAccount <TezosAccount>("XTZ"), swapClient: swapClient, currencies: account.Currencies), FA2 _ => (ICurrencySwap) new FA2Swap( account: account.GetCurrencyAccount <FA2Account>(currency.Name), tezosAccount: account.GetCurrencyAccount <TezosAccount>("XTZ"), swapClient: swapClient, currencies: account.Currencies), FA12 _ => (ICurrencySwap) new FA12Swap( account: account.GetCurrencyAccount <FA12Account>(currency.Name), tezosAccount: account.GetCurrencyAccount <TezosAccount>("XTZ"), swapClient: swapClient, currencies: account.Currencies), Atomex.Tezos _ => (ICurrencySwap) new TezosSwap( account: account.GetCurrencyAccount <TezosAccount>(currency.Name), swapClient: swapClient, currencies: account.Currencies), _ => throw new NotSupportedException($"Not supported currency {currency.Name}"), });
public static void TestQuery() { FA2 fe = new FA2(GetConStr()); // IEnumerable<int> next_j = from n in fe.JournalMaster // orderby n.J_ID // select Int32.Parse(n.J_ID); // int rs = next_j.ElementAt(0); var test = from n in fe.FAGroup select n; foreach (var c in test) { Console.WriteLine(c.A_CODE + " " + c.A_DESC); } // Console.WriteLine(rs); }
public static void SubQuery() { FA2 fe = new FA2(GetConStr()); var c = from n in fe.FAGroup select new { n.A_CODE, Desc = from d in fe.FASubGroup where d.S_CODE.Substring(0, 2) == n.A_CODE select new { d.S_CODE, d.S_DESC } }; foreach (var t in c) { foreach (var r in t.Desc) Console.WriteLine(t.A_CODE +" "+r.S_CODE +" "+ r.S_DESC); } }
public static void SimpleQuery() { FA2 fe = new FA2(GetConStr()); var c = from n in fe.FAGroup select new { n.A_CODE, n.A_DESC }; foreach (var t in c) { Console.WriteLine(t.A_CODE +" " + t.A_DESC); } }