private void AppendIncomingCallCommandsTag(StringBuilder builder)
{
builder.Append("<commands scenario='incomingcall'>");
string CommandIDFormat = "<command id='{0}'";
string ArgumentFormat = "arguments='{0}'";
if (IncomingCallCommands.ShowVideoCommand)
{
builder.AppendFormat(CommandIDFormat, "video");
if (!string.IsNullOrEmpty(IncomingCallCommands.VideoArgument))
{
builder.AppendFormat(ArgumentFormat, Util.HttpEncode(IncomingCallCommands.VideoArgument));
}
builder.Append("/>");
}
if (IncomingCallCommands.ShowVoiceCommand)
{
builder.AppendFormat(CommandIDFormat, "voice");
if (!string.IsNullOrEmpty(IncomingCallCommands.VoiceArgument))
{
builder.AppendFormat(ArgumentFormat, Util.HttpEncode(IncomingCallCommands.VoiceArgument));
}
builder.Append("/>");
}
if (IncomingCallCommands.ShowDeclineCommand)
{
builder.AppendFormat(CommandIDFormat, "decline");
if (!string.IsNullOrEmpty(IncomingCallCommands.DeclineArgument))
{
builder.AppendFormat(ArgumentFormat, Util.HttpEncode(IncomingCallCommands.DeclineArgument));
}
builder.Append("/>");
}
builder.Append("</commands>");
}