本文整理汇总了C#中Command.ToXmlNode方法的典型用法代码示例。如果您正苦于以下问题:C# Command.ToXmlNode方法的具体用法?C# Command.ToXmlNode怎么用?C# Command.ToXmlNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Command
的用法示例。
在下文中一共展示了Command.ToXmlNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConvertCommand
private static XmlNode ConvertCommand(Token token, State state, Command command)
{
if (token != null && token.AppType == AppType.Mobile)
{
return iExchange3Promotion.Mobile.Manager.ConvertCommand(token, command);
}
var commandNode = command.ToXmlNode(token, state);
var commandElement = commandNode as XmlElement;
if (commandElement == null)
{
return null;
}
lock (_Lock)
{
if (!commandElement.HasAttribute(ResponseConstants.CommandSequence))
{
commandElement.SetAttribute(ResponseConstants.CommandSequence, command.Sequence.ToString());
}
}
return commandElement;
}
示例2: AppendChild
private void AppendChild(XmlElement commands, Command command, Token token, State state)
{
if (command == null) return;
XmlNode commandNode = command.ToXmlNode(token, state);
if (commandNode != null)
{
XmlNode commandNode2 = commands.OwnerDocument.ImportNode(commandNode, true);
if (token.UserType == UserType.TradingProxy)
{
((XmlElement)commandNode2).SetAttribute("CommandSequenceForTradingProxy", command.Sequence.ToString());
}
commands.AppendChild(commandNode2);
}
}