ContactStore ContactStore ContactStore ContactStore Class

Definition

Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

[Contains prerelease APIs.]
Represents a database that contains contacts.

public : sealed class ContactStore : IContactStore, IContactStore2public sealed class ContactStore : IContactStore, IContactStore2Public NotInheritable Class ContactStore Implements IContactStore, IContactStore2// You can use this class in JavaScript.
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 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// You can use this property in JavaScript.
Value
AggregateContactManager AggregateContactManager AggregateContactManager AggregateContactManager

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

ChangeTracker 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// You can use this property in JavaScript.
Value
ContactChangeTracker ContactChangeTracker ContactChangeTracker ContactChangeTracker

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

Methods

CreateContactListAsync(String) 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 )// You can use this method in JavaScript.
Parameters
displayName
PlatForm::String String String String

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

Returns
See Also

CreateContactListAsync(String, String) 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 )// You can use this method in JavaScript.
Parameters
displayName
PlatForm::String String String String

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

userDataAccountId
PlatForm::String String String String

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

Returns
See Also

FindContactListsAsync() 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 )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<ContactList>> IAsyncOperation<IReadOnlyList<ContactList>> IAsyncOperation<IReadOnlyList<ContactList>> IAsyncOperation<IReadOnlyList<ContactList>>

The list of ContactList objects.

FindContactsAsync() 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 )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<Contact>> IAsyncOperation<IReadOnlyList<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 for .NET.)

See Also

FindContactsAsync(String) 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 )// You can use this method in JavaScript.
Parameters
searchText
PlatForm::String 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>> 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 for .NET.)

See Also

GetChangeTracker(String) GetChangeTracker(String) GetChangeTracker(String) GetChangeTracker(String)

Prerelease. Gets a ContactChangeTracker that provides functionality for monitoring changes to Contact objects in the ContactStore.

public : ContactChangeTracker GetChangeTracker(PlatForm::String identity)public ContactChangeTracker GetChangeTracker(String identity)Public Function GetChangeTracker(identity As String) As ContactChangeTracker// You can use this method in JavaScript.
Parameters
identity
PlatForm::String String String String

A string that identifies the ContactChangeTracker instance in the store.

Returns

A ContactChangeTracker that provides functionality for monitoring changes to Contact objects in the ContactStore.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

You can create multiple ContactChangeTracker instances by using this method. If you pass in a string that identifies a ContactChangeTracker that already exists in the store, this method returns that instance. If the string that you pass into this method does not identify an existing an existing ContactChangeTracker, this method returns a new ContactChangeTracker.

You can use the IsTracking property of the ContactChangeTracker to determine whether change tracking is enabled for the ContactChangeTracker.

GetContactAsync(String) 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 )// You can use this method in JavaScript.
Parameters
contactId
PlatForm::String 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.

See Also

GetContactListAsync(String) 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 )// You can use this method in JavaScript.
Parameters
contactListId
PlatForm::String String String String

The ID of the ContactList to retrieve.

Returns

Remarks

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

GetContactReader() GetContactReader() GetContactReader() GetContactReader()

Creates and returns a ContactReader for the ContactStore.

public : ContactReader GetContactReader()public ContactReader GetContactReader()Public Function GetContactReader() As ContactReader// You can use this method in JavaScript.
Returns
See Also

GetContactReader(ContactQueryOptions) 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// You can use this method in JavaScript.
Parameters
options
ContactQueryOptions ContactQueryOptions ContactQueryOptions ContactQueryOptions

The query options to use when creating the new ContactReader.

Returns
See Also

GetMeContactAsync() 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 )// You can use this method in JavaScript.
Returns

Events

ContactChanged ContactChanged ContactChanged ContactChanged

Occurs when a Contact in the ContactStore has been changed.

public : event TypedEventHandler ContactChanged<ContactStore,  ContactChangedEventArgs>public event TypedEventHandler ContactChanged<ContactStore,  ContactChangedEventArgs>Public Event ContactChanged<ContactStore,  ContactChangedEventArgs>// You can use this event in JavaScript.