Returns an enumerable collection of XMPP features supported by the XMPP
client with the specified JID.
Namespace: S22.Xmpp.ClientAssembly: S22.Xmpp (in S22.Xmpp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
public IEnumerable<Extension> GetFeatures( Jid jid ) |
Parameters
- jid
- Type: S22.Xmpp..::..Jid
The JID of the XMPP client to retrieve a collection of supported features for.
Return Value
An enumerable collection of XMPP extensions supported by the XMPP client with the specified JID.Examples
This example shows how to use the GetFeatures method to print out a
list of features supported by the XMPP client of a chat contact.
CopyC#
string hostname = "jabber.se", username = "myUsername", password = "myPassword"; Jid juliet = "juliet@capulet.com/balcony"; using (var cl = new XmppClient(hostname, username, password)) { cl.Connect(); Console.WriteLine("Juliet's XMPP client supports: "); foreach (var feat in cl.GetFeatures(juliet)) Console.WriteLine(" - " + feat); }
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | The jid parameter is null. |
System..::..InvalidOperationException | The XmppClient instance is not connected to a remote host. |
System.IO..::..IOException | There was a failure while writing to or reading from the network. |
System..::..NotSupportedException | The XMPP client of the user with the specified JID does not support the retrieval of feature information. |
System..::..ObjectDisposedException | The XmppClient object has been disposed. |
S22.Xmpp..::..XmppErrorException | The server or the XMPP client of the user with the specified JID returned an XMPP error code. Use the Error property of the XmppErrorException to obtain the specific error condition. |
S22.Xmpp..::..XmppException | The server returned invalid data or another unspecified XMPP error occurred. |