AsterNet Class Library (Sandcastle documentation)
AsterNet Class Library (Sandcastle documentation)
AsterNET.Manager.Response
ManagerResponse Class
ManagerResponse Methods
GetAttribute Method
IsSuccess Method
Parse Method
ParseSpecial Method
ToString Method

| ManagerResponse GetAttribute Method

Returns the value of the attribute with the given key.
This is particulary important when a response contains special attributes that are dependent on the action that has been sent.
An example of this is the response to the GetVarAction. It contains the value of the channel variable as an attribute stored under the key of the variable name.
Example:

                        GetVarAction action = new GetVarAction();
                        action.setChannel("SIP/1310-22c3");
                        action.setVariable("ALERT_INFO");
                        ManagerResponse response = connection.SendAction(action);
                        String alertInfo = response.getAttribute("ALERT_INFO");

As all attributes are internally stored in lower case the key is automatically converted to lower case before lookup.

Namespace: AsterNET.Manager.Response
Assembly: AsterNET (in AsterNET.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy

    public string GetAttribute(
    	string key
    )

    Public Function GetAttribute (
    	key As String
    ) As String

    public:
    String^ GetAttribute(
    	String^ key
    )

    member GetAttribute :
            key : string -> string

#### Parameters

key
  Type: System
  String
  the key to lookup.

#### Return Value

Type: String
the value of the attribute stored under this key or null if there is no such attribute.
See Also

#### Reference

ManagerResponse Class
AsterNET.Manager.Response Namespace