Language

AppSearchBatchResult.Builder.SetFailure(Object, Int32, String) Method

Definition

Records a failed operation for a key.

[Android.Runtime.Register("setFailure", "(Ljava/lang/Object;ILjava/lang/String;)Landroid/app/appsearch/AppSearchBatchResult$Builder;", "", ApiSince=31)]
public Android.App.AppSearch.AppSearchBatchResult.Builder SetFailure(Java.Lang.Object key, int resultCode, string? errorMessage);
[<Android.Runtime.Register("setFailure", "(Ljava/lang/Object;ILjava/lang/String;)Landroid/app/appsearch/AppSearchBatchResult$Builder;", "", ApiSince=31)>]
member this.SetFailure : Java.Lang.Object * int * string -> Android.App.AppSearch.AppSearchBatchResult.Builder

Parameters

key
Object

The key under which to record the failure.

resultCode
Int32

The result code to store in the failure entry.

errorMessage
String

The failure message to store, or null for no message.

Returns

This builder instance.

Attributes

Remarks

A previous success for the key is removed. The failure is stored with its result code and optional message.

Applies to