using System; namespace Asterisk.NET.Manager.Action { /// /// Retrieves an entry in the Asterisk database for a given family and key.
/// If an entry is found a DBGetResponseEvent is sent by Asterisk containing the /// value, otherwise a ManagerError indicates that no entry matches. ///
/// public class DBGetAction : ManagerActionEvent { private string family; private string key; public override string Action { get { return "DBGet"; } } /// Returns the family of the key. /// /// /// the family of the key. /// /// Sets the family of the key. /// /// /// the family of the key. /// public string Family { get { return family; } set { this.family = value; } } /// /// Get/Set the the key of the entry to retrieve. /// public string Key { get { return key; } set { this.key = value; } } public override Type ActionCompleteEventClass() { return typeof(Event.DBGetResponseEvent); } /// /// Creates a new empty DBGetAction. /// public DBGetAction() { } /// /// Creates a new DBGetAction that retrieves the value of the database entry /// with the given key in the given family. /// /// the family of the key /// the key of the entry to retrieve public DBGetAction(string family, string key) { this.family = family; this.key = key; } } }