Publishes the image located at the specified path as the user's avatar.

Namespace: S22.Xmpp.Client
Assembly: S22.Xmpp (in S22.Xmpp.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public void SetAvatar(
	string filePath
)

Parameters

filePath
Type: System..::..String
The path to the image to publish as the user's avatar.

Remarks

The following file types are supported: BMP, GIF, JPEG, PNG and TIFF.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThe filePath parameter is null.
System..::..ArgumentExceptionfilePath is a zero-length string, contains only white space, or contains one or more invalid characters.
System.IO..::..PathTooLongExceptionThe specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
System.IO..::..DirectoryNotFoundExceptionThe specified path is invalid, (for example, it is on an unmapped drive).
System..::..UnauthorizedAccessExceptionThe path specified is a directory, or the caller does not have the required permission.
System.IO..::..FileNotFoundExceptionThe file specified in filePath was not found.
System..::..NotSupportedExceptionfilePath is in an invalid format, or the server does not support the 'Personal Eventing Protocol' extension.
S22.Xmpp..::..XmppErrorExceptionThe server returned an XMPP error code. Use the Error property of the XmppErrorException to obtain the specific error condition.
S22.Xmpp..::..XmppExceptionThe server returned invalid data or another unspecified XMPP error occurred.
System..::..InvalidOperationExceptionThe XmppClient instance is not connected to a remote host, or the XmppClient instance has not authenticated with the XMPP server.
System..::..ObjectDisposedExceptionThe XmppClient object has been disposed.

See Also