using System;
namespace AsterNET.Manager.Action
{
///
/// The AgentLogoffAction sets an agent as no longer logged in.
///
public class AgentLogoffAction : ManagerAction
{
private string agent;
private bool soft;
#region Action
///
/// Returns the name of this action, i.e. "AgentLogoff".
///
/// the name of this action
override public string Action
{
get
{
return "AgentLogoff";
}
}
#endregion
#region Agent
///
/// Returns the name of the agent to log off, for example "1002".
///
/// the name of the agent to log off
/// Sets the name of the agent to log off, for example "1002".
/// This is property is mandatory.
///
/// the name of the agent to log off
public string Agent
{
get
{
return agent;
}
set
{
this.agent = value;
}
}
#endregion
#region Soft
///
/// Get/Set whether to hangup existing calls or not.
/// Default is to hangup existing calls on logoff.
///
/// true if existing calls should not be hung up, false otherwise.
/// null
if default should be used.
///
public bool Soft
{
get { return soft; }
set { this.soft = value; }
}
#endregion
#region Constructors - AgentLogoffAction()
/// Creates a new empty AgentLogoffAction.
public AgentLogoffAction()
{
}
///
/// Creates a new AgentLogoffAction that logs off the given agent
///
/// the name of the agent to log off.
public AgentLogoffAction(string agent)
{
this.agent = agent;
}
#endregion
#region Constructors - AgentLogoffAction(string agent, bool soft)
///
/// Creates a new AgentLogoffAction that logs off the given agent
///
/// the name of the agent to log off.
/// true if exisiting calls should not be hung up on logout.
public AgentLogoffAction(string agent, bool soft)
: this(agent)
{
this.soft = soft;
}
#endregion
}
}