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

37 lines
1.1 KiB
C#

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