Share via


IStorageProviderSuggestionsHandler.Add Method

Definition

Adds an item to the cloud storage provider's suggestions of the given result kind.

Important

The Windows.Storage.Provider.IStorageProviderSuggestionsHandler API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form.

public:
 void Add(StorageProviderResultKind kind, Platform::String ^ remoteFileId);
void Add(StorageProviderResultKind const& kind, winrt::hstring const& remoteFileId);
public void Add(StorageProviderResultKind kind, string remoteFileId);
function add(kind, remoteFileId)
Public Sub Add (kind As StorageProviderResultKind, remoteFileId As String)

Parameters

kind
StorageProviderResultKind

The kind of item to add.

remoteFileId
String

Platform::String

winrt::hstring

The remote file ID of the item to add. See StorageProviderSuggestionResult.RemoteFileId.

Remarks

After Add is successfully called for an item, the cloud storage provider should ensure that the item is eligible to be returned in future calls to GetSuggestions for that result kind.

To support offline scenarios and improve reliability, the cloud storage provider should ensure that added suggestions are cached locally and synchronized with any backing service once service connectivity is restored.

If the given StorageProviderResultKind is not supported by the cloud provider, they should no-op the API call.

The given remote file ID will be the same value as the System.StorageProviderFileIdentifier property for the item. The ID may not correspond to an item returned by a previous call to GetSuggestions. This can occur if the user interacts with an item in the provider's sync root (for example, pinning a new item to Favorites).

Applies to