public static Task FireEventAsync(this MtApiQuoteHandler evenHandler, object sender, string symbol, double bid, double ask) { return(Task.Factory.StartNew(() => { evenHandler?.Invoke(sender, symbol, bid, ask); })); }
public static async void FireEvent(this MtApiQuoteHandler evenHandler, object sender, string symbol, double bid, double ask) { if (evenHandler != null) { await Task.Factory.StartNew(() => { evenHandler(sender, symbol, bid, ask); }); } }