ContactGroupServices.BeginAddContact Method (String, String, Boolean, String, String, Int32 , AsyncCallback, Object)

NOTE: This API is now obsolete.

Begins an asynchronous operation to add a contact.

Namespace:  Microsoft.Rtc.Collaboration.ContactsGroups
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'Declaration
<ObsoleteAttribute("This method will be removed from future Versions. Please use BeginAddContact(contactUri, options, userCallback, state) instead.")> _
Public Function BeginAddContact ( _
    contactUri As String, _
    contactName As String, _
    isSubscribed As Boolean, _
    contactData As String, _
    contactExtension As String, _
    groupIds As Integer(), _
    userCallback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim instance As ContactGroupServices
Dim contactUri As String
Dim contactName As String
Dim isSubscribed As Boolean
Dim contactData As String
Dim contactExtension As String
Dim groupIds As Integer()
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = instance.BeginAddContact(contactUri, _
    contactName, isSubscribed, contactData, _
    contactExtension, groupIds, userCallback, _
    state)
[ObsoleteAttribute("This method will be removed from future Versions. Please use BeginAddContact(contactUri, options, userCallback, state) instead.")]
public IAsyncResult BeginAddContact(
    string contactUri,
    string contactName,
    bool isSubscribed,
    string contactData,
    string contactExtension,
    int[] groupIds,
    AsyncCallback userCallback,
    Object state
)

Parameters

  • contactName
    Type: System.String
    Name of the contact being added.
  • isSubscribed
    Type: System.Boolean
    True, if this contact also needs to be subscribed.
  • contactExtension
    Type: System.String
    ContactExtension data needs to be published with this contact.
  • groupIds
    Type: []
    List of GroupIds where this contact would be added.
  • userCallback
    Type: System.AsyncCallback
    The method to be called when the asynchronous operation is completed.
  • state
    Type: System.Object
    A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.

Return Value

Type: System.IAsyncResult
An IAsyncResult that references the asynchronous operation.

Exceptions

Exception Condition
ArgumentOutOfRangeException

Thrown when any of the groupIds are less than zero.

InvalidOperationException

Thrown when the subscription state is not idle or subscribed.

ArgumentException

Thrown when contactUri is an invalid sip URI.

ArgumentNullException

Thrown when contactName or contactDataare null.

See Also

Reference

ContactGroupServices Class

ContactGroupServices Members

BeginAddContact Overload

Microsoft.Rtc.Collaboration.ContactsGroups Namespace