本文整理汇总了C#中Slot.Open方法的典型用法代码示例。如果您正苦于以下问题:C# Slot.Open方法的具体用法?C# Slot.Open怎么用?C# Slot.Open使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Slot
的用法示例。
在下文中一共展示了Slot.Open方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AlorTrader
/// <summary>
/// Создать подключение.
/// </summary>
/// <param name="slotId">Номер слота.</param>
/// <param name="address">Адрес сервера.</param>
/// <param name="login">Логин.</param>
/// <param name="password">Пароль.</param>
public AlorTrader(int slotId, string address, string login, string password)
{
if (address == null)
throw new ArgumentNullException("address");
if (login.IsEmpty())
throw new ArgumentNullException("login");
if (password.IsEmpty())
throw new ArgumentNullException("password");
Address = address;
Login = login;
_password = password.To<SecureString>();
_slot = new Slot();
_slot.Open(slotId);
_slot.Connected += SlotConnected;
_slot.Disconnected += SlotDisconnected;
_slot.Error += SlotError;
//SecuritiesTable = new AlorTable(AlorTableTypes.Security, "SECURITIES", RaiseProcessDataError);
//TradesTable = new AlorTable(AlorTableTypes.Trade, "ALL_TRADES", RaiseProcessDataError);
//OrdersTable = new AlorTable(AlorTableTypes.Order, "ORDERS", RaiseProcessDataError);
//StopOrdersTable = new AlorTable(AlorTableTypes.StopOrder, "STOPORDERS", RaiseProcessDataError);
//MyTradesTable = new AlorTable(AlorTableTypes.MyTrade, "TRADES", RaiseProcessDataError);
//QuotesTable = new Dictionary<int, AlorTable>();
//PortfoliosTable = new AlorTable(AlorTableTypes.Portfolio, "TRDACC", RaiseProcessDataError);
//HoldingTable = new AlorTable(AlorTableTypes.Position, "HOLDING", RaiseProcessDataError);
//MoneyPositionTable = new AlorTable(AlorTableTypes.Money, "POSITIONS", RaiseProcessDataError);
//TimeTable = new AlorTable(AlorTableTypes.Time, "TESYSTIME", RaiseProcessDataError);
AlorManagerColumns.InitMetadata();
ManagerColumns = new AlorManagerColumns();
Synchronized();
_slot.Synchronized += SlotSynchronized;
}