コード例 #1
0
        public async Task <ActionResult <IEnumerable <Rate> > > GetRates()
        {
            var logic = new BusinessLogic.Logic();

            //レート一覧を取得する
            var ret = await logic.GetRatesAsync();

            return(Ok(ret));
        }
コード例 #2
0
        public async Task <ActionResult <ExchangeInfo> > GetPrice(string currencyPair, double price)
        {
            //入力値チェック
            if (string.IsNullOrEmpty(currencyPair))
            {
                throw new ArgumentException("currencyPair");
            }

            var logic = new BusinessLogic.Logic();

            //指定した通貨ペアで金額を変換する
            var ret = await logic.GetExchangePriceAsync(currencyPair, price);

            return(Ok(ret));
        }
コード例 #3
0
 public MainWindow(string username, Lobby sender)
 {
     _logic = new BusinessLogic.Logic(username);
     _sender = sender;
     InitializeComponent();
     //Load setings
     BackgroundWorker worker = new BackgroundWorker();
     worker.DoWork += worker_DoWork;
     worker.RunWorkerCompleted += worker_RunWorkerCompleted;
     worker.RunWorkerAsync();
     MessagingClient.MessageReceived += RequestParser_messageReceived;
     InitTimeRemainingTimer();
     _logic.UpdateCorrectAnswerCount(0);
     correctCount.Text = _logic.GetCorrectAnswerCount().ToString();
     InitDataTable();
     chatWindowControl = new ChatWindowControl(sendMessageField, chatBoxLabel, chatBoxField, sendMessageButton, username);
 }