Прочетете на английски Редактиране

Споделяне чрез


DiscoveryClient.FindAsync Method

Definition

Begins an asynchronous find operation.

Overloads

FindAsync(FindCriteria, Object)

Begins an asynchronous find operation with the specified criteria and user defined state object.

FindAsync(FindCriteria)

Begins an asynchronous find operation with the specified criteria.

FindAsync(FindCriteria, Object)

Begins an asynchronous find operation with the specified criteria and user defined state object.

C#
public void FindAsync(System.ServiceModel.Discovery.FindCriteria criteria, object userState);

Parameters

criteria
FindCriteria

The criteria for finding services.

userState
Object

A user specified object to identify the asynchronous find operation.

Remarks

If the userState parameter is null, the find operation cannot be canceled.

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

FindAsync(FindCriteria)

Begins an asynchronous find operation with the specified criteria.

C#
public void FindAsync(System.ServiceModel.Discovery.FindCriteria criteria);

Parameters

criteria
FindCriteria

The criteria for finding services.

Remarks

Find operations initiated by calling this method cannot be canceled.

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Find(FindCriteria).

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1