本文整理汇总了C#中SortedList.GetEnumParam方法的典型用法代码示例。如果您正苦于以下问题:C# SortedList.GetEnumParam方法的具体用法?C# SortedList.GetEnumParam怎么用?C# SortedList.GetEnumParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SortedList
的用法示例。
在下文中一共展示了SortedList.GetEnumParam方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
/// <summary>
/// Инициализировать настройки на основе параметров канала связи
/// </summary>
public void Init(SortedList<string, string> commCnlParams, bool requireParams = true)
{
ConnMode = commCnlParams.GetEnumParam<ConnectionModes>("ConnMode", requireParams, ConnMode);
bool sharedConnMode = ConnMode == ConnectionModes.Shared;
IpAddress = commCnlParams.GetStringParam("IpAddress", requireParams && sharedConnMode, IpAddress);
TcpPort = commCnlParams.GetIntParam("TcpPort", requireParams && sharedConnMode, TcpPort);
Behavior = commCnlParams.GetEnumParam<OperatingBehaviors>("Behavior", false, Behavior);
}
示例2: Init
/// <summary>
/// Инициализировать настройки на основе параметров канала связи
/// </summary>
public void Init(SortedList<string, string> commCnlParams, bool requireParams = true)
{
PortName = commCnlParams.GetStringParam("PortName", requireParams, PortName);
BaudRate = commCnlParams.GetIntParam("BaudRate", requireParams, BaudRate);
Parity = commCnlParams.GetEnumParam<Parity>("Parity", false, Parity);
DataBits = commCnlParams.GetIntParam("DataBits", false, DataBits);
StopBits = commCnlParams.GetEnumParam<StopBits>("StopBits", false, StopBits);
DtrEnable = commCnlParams.GetBoolParam("DtrEnable", false, DtrEnable);
RtsEnable = commCnlParams.GetBoolParam("RtsEnable", false, RtsEnable);
Behavior = commCnlParams.GetEnumParam<OperatingBehaviors>("Behavior", false, Behavior);
}
示例3: Init
/// <summary>
/// Инициализировать настройки на основе параметров канала связи
/// </summary>
public void Init(SortedList<string, string> commCnlParams, bool requireParams = true)
{
TcpPort = commCnlParams.GetIntParam("TcpPort", requireParams, TcpPort);
InactiveTime = commCnlParams.GetIntParam("InactiveTime", false, InactiveTime);
Behavior = commCnlParams.GetEnumParam<OperatingBehaviors>("Behavior", false, Behavior);
ConnMode = commCnlParams.GetEnumParam<ConnectionModes>("ConnMode", false, ConnMode);
DevSelMode = commCnlParams.GetEnumParam<DeviceSelectionModes>("DevSelMode", false, DevSelMode);
}
示例4: Init
/// <summary>
/// Инициализировать настройки на основе параметров канала связи
/// </summary>
public void Init(SortedList<string, string> commCnlParams, bool requireParams = true)
{
LocalUdpPort = commCnlParams.GetIntParam("LocalUdpPort", requireParams, LocalUdpPort);
RemoteUdpPort = commCnlParams.GetIntParam("RemoteUdpPort", false, RemoteUdpPort);
RemoteIpAddress = commCnlParams.GetStringParam("RemoteIpAddress", false, RemoteIpAddress);
Behavior = commCnlParams.GetEnumParam<OperatingBehaviors>("Behavior", false, Behavior);
DevSelMode = commCnlParams.GetEnumParam<DeviceSelectionModes>("DevSelMode", false, DevSelMode);
}