Contact​Store Contact​Store Contact​Store Class

Definition

Represents a database that contains contacts.

public sealed class ContactStore : IContactStore, IContactStore2public sealed class ContactStore : IContactStore, IContactStore2Public NotInheritable Class ContactStore Implements IContactStore, IContactStore2
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

To get a ContactStore object, call the static utility method ContactManager.RequestStoreAsync.

Properties

AggregateContactManager AggregateContactManager AggregateContactManager

Gets a contact manager that provides functionality for linking individual (raw) contacts across services together into a single aggregate contact.

public AggregateContactManager AggregateContactManager { get; }public AggregateContactManager AggregateContactManager { get; }Public ReadOnly Property AggregateContactManager As AggregateContactManager
Value
AggregateContactManager AggregateContactManager AggregateContactManager

A contact manager that provides functionality for linking individual (raw) contacts across services together into a single aggregate contact.

Attributes

ChangeTracker ChangeTracker ChangeTracker

Gets the ContactChangeTracker which provides functionality for monitoring changes to Contact objects in the ContactStore.

public ContactChangeTracker ChangeTracker { get; }public ContactChangeTracker ChangeTracker { get; }Public ReadOnly Property ChangeTracker As ContactChangeTracker
Value
ContactChangeTracker ContactChangeTracker ContactChangeTracker

The ContactChangeTracker which provides functionality for monitoring changes to Contact objects in the ContactStore.

Attributes

Methods

CreateContactListAsync(String) CreateContactListAsync(String) CreateContactListAsync(String)

Asynchronously creates a ContactList with the specified display name.

public IAsyncOperation<ContactList> CreateContactListAsync(String displayName)public IAsyncOperation<ContactList> CreateContactListAsync(String displayName)Public Function CreateContactListAsync(displayName As String) As IAsyncOperation( Of ContactList )
Parameters
displayName
System.String System.String System.String

A name for the new ContactList, suitable for displaying in the user interface.

Returns

The newly created ContactList.

Attributes

CreateContactListAsync(String, String) CreateContactListAsync(String, String) CreateContactListAsync(String, String)

Asynchronously creates a ContactList with the specified display name and user account.

public IAsyncOperation<ContactList> CreateContactListAsync(String displayName, String userDataAccountId)public IAsyncOperation<ContactList> CreateContactListAsync(String displayName, String userDataAccountId)Public Function CreateContactListAsync(displayName As String, userDataAccountId As String) As IAsyncOperation( Of ContactList )
Parameters
displayName
System.String System.String System.String

A name for the new ContactList, suitable for displaying in the user interface.

userDataAccountId
System.String System.String System.String

The ID for the UserDataAccount to use when creating the ContactList.

Returns

The newly created ContactList.

Attributes

FindContactListsAsync() FindContactListsAsync() FindContactListsAsync()

Asynchronously returns the list of ContactList objects.

public IAsyncOperation<IVectorView<ContactList>> FindContactListsAsync()public IAsyncOperation<IVectorView<ContactList>> FindContactListsAsync()Public Function FindContactListsAsync() As IAsyncOperation( Of IVectorViewContactList )
Returns

The list of ContactList objects.

Attributes

FindContactsAsync() FindContactsAsync() FindContactsAsync()

Retrieves the list of all contacts in the contact store.

public IAsyncOperation<IVectorView<Contact>> FindContactsAsync()public IAsyncOperation<IVectorView<Contact>> FindContactsAsync()Public Function FindContactsAsync() As IAsyncOperation( Of IVectorViewContact )
Returns

An asynchronous operation that returns a list of all Contact objects in the contact store. If you use Asynchronous programming, the result type is a read-only list/vector of Contact items. (You can use APIs of IVectorView; for C++ or JavaScript, APIs of IReadOnlyList<Contact> for .NET.)

Attributes
See Also

FindContactsAsync(String) FindContactsAsync(String) FindContactsAsync(String)

Retrieves a list of Contact objects based on the supplied search text.

public IAsyncOperation<IVectorView<Contact>> FindContactsAsync(String searchText)public IAsyncOperation<IVectorView<Contact>> FindContactsAsync(String searchText)Public Function FindContactsAsync(searchText As String) As IAsyncOperation( Of IVectorViewContact )
Parameters
searchText
System.String System.String System.String

The search string for the operation. The query will attempt to match the name (Name ), email address (Emails values), or phone number (Phones values) of a contact.

Returns

An asynchronous operation that returns a search-filtered list of contacts on successful completion. If you use Asynchronous programming, the result type is a read-only list/vector of Contact items. (You can use APIs of IVectorView; for C++ or JavaScript, APIs of IReadOnlyList<Contact> for .NET.)

Attributes
See Also

GetContactAsync(String) GetContactAsync(String) GetContactAsync(String)

Retrieves a Contact object representing the contact with the specified Id value.

public IAsyncOperation<Contact> GetContactAsync(String contactId)public IAsyncOperation<Contact> GetContactAsync(String contactId)Public Function GetContactAsync(contactId As String) As IAsyncOperation( Of Contact )
Parameters
contactId
System.String System.String System.String

The Id of the contact to be retrieved.

Returns

An asynchronous operation that returns a Contact object on successful completion. If you use Asynchronous programming, the result type is a single Contact object.

Attributes
See Also

GetContactListAsync(String) GetContactListAsync(String) GetContactListAsync(String)

Asynchronously gets the ContactList with the specified ID.

public IAsyncOperation<ContactList> GetContactListAsync(String contactListId)public IAsyncOperation<ContactList> GetContactListAsync(String contactListId)Public Function GetContactListAsync(contactListId As String) As IAsyncOperation( Of ContactList )
Parameters
contactListId
System.String System.String System.String

The ID of the ContactList to retrieve.

Returns

The ContactList with the specified ID or null if the list is not found.

Attributes

Remarks

This method throws an invalid argument exception if the contactListId is malformed.

GetContactReader() GetContactReader() GetContactReader()

Creates and returns a ContactReader for the ContactStore.

public ContactReader GetContactReader()public ContactReader GetContactReader()Public Function GetContactReader() As ContactReader
Returns
Attributes

GetContactReader(ContactQueryOptions) GetContactReader(ContactQueryOptions) GetContactReader(ContactQueryOptions)

Creates and returns a ContactReader for the ContactStore with the specified ContactQueryOptions.

public ContactReader GetContactReader(ContactQueryOptions options)public ContactReader GetContactReader(ContactQueryOptions options)Public Function GetContactReader(options As ContactQueryOptions) As ContactReader
Parameters
options
ContactQueryOptions ContactQueryOptions ContactQueryOptions

The query options to use when creating the new ContactReader.

Returns
Attributes

GetMeContactAsync() GetMeContactAsync() GetMeContactAsync()

Get the Contact object for the current user.

public IAsyncOperation<Contact> GetMeContactAsync()public IAsyncOperation<Contact> GetMeContactAsync()Public Function GetMeContactAsync() As IAsyncOperation( Of Contact )
Returns

The Contact object for the current user.

Attributes

Events

ContactChanged ContactChanged ContactChanged

Occurs when a Contact in the ContactStore has been changed.

public event TypedEventHandler ContactChangedpublic event TypedEventHandler ContactChangedPublic Event ContactChanged
Attributes