using System;
namespace AsterNET.FastAGI.Command
{
///
/// Sets the given channel variable to the given value.
///
public class SetVariableCommand : AGICommand
{
/// The name of the variable to set.
private string varName;
/// The value to set.
private string varValue;
///
/// Get/Set the name of the variable to set.
///
public string Variable
{
get { return varName; }
set { this.varName = value; }
}
///
/// Get/Set the value to set.
///
public string Value
{
get { return varValue; }
set { this.varValue = value; }
}
///
/// Creates a new GetVariableCommand.
///
/// the name of the variable to set.
/// the value to set.
public SetVariableCommand(string name, string value)
{
this.varName = name;
this.varValue = value;
}
public override string BuildCommand()
{
return "SET VARIABLE " + EscapeAndQuote(varName) + " " + EscapeAndQuote(varValue);
}
}
}