asternet/Asterisk.2013/Asterisk.NET/FastAGI/Command/SetContextCommand.cs
2014-01-08 14:16:39 +00:00

35 lines
899 B
C#

using System;
namespace AsterNET.FastAGI.Command
{
/// <summary>
/// Sets the context for continuation upon exiting the application.
/// </summary>
public class SetContextCommand : AGICommand
{
/// <summary> The context for continuation upon exiting the application.</summary>
private string context;
/// <summary>
/// Get/Set the context for continuation upon exiting the application.
/// </summary>
public string Context
{
get { return context; }
set { this.context = value; }
}
/// <summary>
/// Creates a new SetPriorityCommand.
/// </summary>
/// <param name="context">the context for continuation upon exiting the application.</param>
public SetContextCommand(string context)
{
this.context = context;
}
public override string BuildCommand()
{
return "SET CONTEXT " + EscapeAndQuote(context);
}
}
}