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(PlatForm::String displayName)public IAsyncOperation<ContactList> CreateContactListAsync(String displayName)Public Function CreateContactListAsync(displayName As String) As IAsyncOperation( Of ContactList )
Parameters
displayName
PlatForm::String String String

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

Returns
Attributes
See Also

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(PlatForm::String displayName, PlatForm::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
PlatForm::String String String

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

userDataAccountId
PlatForm::String String String

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

Returns
Attributes
See Also

FindContactListsAsync() FindContactListsAsync() FindContactListsAsync()

Asynchronously returns the list of ContactList objects.

public : IAsyncOperation<IVectorView<ContactList>> FindContactListsAsync()public IAsyncOperation<IReadOnlyList<ContactList>> FindContactListsAsync()Public Function FindContactListsAsync() As IAsyncOperation( Of IReadOnlyListContactList )
Returns
IAsyncOperation<IVectorView<ContactList>> IAsyncOperation<IReadOnlyList<ContactList>> IAsyncOperation<IReadOnlyList<ContactList>>

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<IReadOnlyList<Contact>> FindContactsAsync()Public Function FindContactsAsync() As IAsyncOperation( Of IReadOnlyListContact )
Returns
IAsyncOperation<IVectorView<Contact>> IAsyncOperation<IReadOnlyList<Contact>> IAsyncOperation<IReadOnlyList<Contact>>

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(PlatForm::String searchText)public IAsyncOperation<IReadOnlyList<Contact>> FindContactsAsync(String searchText)Public Function FindContactsAsync(searchText As String) As IAsyncOperation( Of IReadOnlyListContact )
Parameters
searchText
PlatForm::String String 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
IAsyncOperation<IVectorView<Contact>> IAsyncOperation<IReadOnlyList<Contact>> IAsyncOperation<IReadOnlyList<Contact>>

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(PlatForm::String contactId)public IAsyncOperation<Contact> GetContactAsync(String contactId)Public Function GetContactAsync(contactId As String) As IAsyncOperation( Of Contact )
Parameters
contactId
PlatForm::String String 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(PlatForm::String contactListId)public IAsyncOperation<ContactList> GetContactListAsync(String contactListId)Public Function GetContactListAsync(contactListId As String) As IAsyncOperation( Of ContactList )
Parameters
contactListId
PlatForm::String String 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
See Also

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
See Also

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
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