31 lines
706 B
C#
31 lines
706 B
C#
using SignalRClient;
|
|
|
|
using System;
|
|
|
|
namespace CommonConsole
|
|
{
|
|
public class Program
|
|
{
|
|
static double value = 0.1;
|
|
static ExchangeHub exchangeI;
|
|
|
|
public static void Main()
|
|
{
|
|
exchangeI = new ExchangeHub();
|
|
exchangeI.ExchangeQ += q => Console.WriteLine(q);
|
|
exchangeI.Connect("http://localhost:52822/");
|
|
|
|
Console.WriteLine($"{nameof(ExchangeHub)} - connected: {exchangeI.Connected}");
|
|
|
|
while (Console.ReadKey().Key == ConsoleKey.Enter)
|
|
{
|
|
value += 0.1D;
|
|
exchangeI.SendExchangeQ(value);
|
|
}
|
|
|
|
exchangeI.Dispose();
|
|
}
|
|
}
|
|
}
|
|
|