IEndpoint.BeginAddContact Method
Begins an asynchronous request to add a contact to the user's contact list.
Namespace: Microsoft.Exchange.InstantMessaging
Assembly: Microsoft.Exchange.InstantMessaging (in Microsoft.Exchange.InstantMessaging.dll)
Syntax
'Declaration
Function BeginAddContact ( _
uri As String, _
name As String, _
subscribed As Boolean, _
tag As Boolean, _
groups As Integer(), _
userCallback As AsyncCallback, _
state As Object _
) As IAsyncResult
'Usage
Dim instance As IEndpoint
Dim uri As String
Dim name As String
Dim subscribed As Boolean
Dim tag As Boolean
Dim groups As Integer()
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult
returnValue = instance.BeginAddContact(uri, _
name, subscribed, tag, groups, userCallback, _
state)
IAsyncResult BeginAddContact(
string uri,
string name,
bool subscribed,
bool tag,
int[] groups,
AsyncCallback userCallback,
Object state
)
Parameters
- uri
Type: System.String
The Session Initiation Protocol (SIP) URI of the contact to add.
- name
Type: System.String
The display name to use for the contact.
- subscribed
Type: System.Boolean
true to indicate presence notifications for this contact should be subscribed to; otherwise, false. Currently not used.
- tag
Type: System.Boolean
true to indicate that the contact is tagged for state change notifications; otherwise, false.
- groups
Type: []
An array of group identifiers that indicate which groups the contact should be added to.
- userCallback
Type: System.AsyncCallback
The System.AsyncCallback delegate that is called when the operation is complete. The callback handler is responsible for calling the EndAddContact(IAsyncResult) method.
- state
Type: System.Object
Contains user state information for the requested operation.
Return Value
Type: System.IAsyncResult
An System.IAsyncResult object that references the asynchronous request.
Remarks
The BeginAddContact(String, String, Boolean, Boolean, [], AsyncCallback, Object) method starts an asynchronous request to add one or more contacts to the user's contacts list. The contact list persists between user sessions. The contacts will not be added to the user's contact list until the callback handler for this operation is invoked and returns successfully.
See Also