Added projects MtApi4 and MtApi5

This commit is contained in:
Vyacheslav Demidyuk
2014-10-31 09:05:52 +02:00
parent 869d3a117b
commit 8746e96416
178 changed files with 26390 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MtApi
{
static class ExtensionMethods
{
#region Event Methods
public static void FireEvent(this EventHandler eventHandler, object sender)
{
if (eventHandler != null)
{
eventHandler(sender, EventArgs.Empty);
}
}
public static void FireEvent<T>(this EventHandler<T> eventHandler, object sender, T e)
where T : EventArgs
{
if (eventHandler != null)
{
eventHandler(sender, e);
}
}
#endregion
public static MtQuote Parse(this MTApiService.MtQuote quote)
{
return (quote != null) ? new MtQuote(quote.Instrument, quote.Bid, quote.Ask) : null;
}
}
}