<PackageReference Include="System.ClientModel" Version="1.5.1" />

System.ClientModel.ClientResult

public class ClientResult
Represents the result of a cloud service operation.
protected ClientResult(PipelineResponse response)

Creates a new instance of ClientResult from a service response.

public static ClientResult<T> FromOptionalValue<T>(T value, PipelineResponse response)

Creates a new instance of ClientResult<T> that holds the provided model value, if any, and the PipelineResponse received from the service. This method is used to create a return value for a service method representing a service operation that may or may not contain a payload. Callers of the client's service method must check whether Value is null to determine whether the service provided a value in its response. Nullable annotations indicate to the end-user the need to check whether Value is null.

public static ClientResult FromResponse(PipelineResponse response)

Creates a new instance of ClientResult that holds the PipelineResponse received from the service.

public static ClientResult<T> FromValue<T>(T value, PipelineResponse response)

Creates a new instance of ClientResult<T> that holds the provided model value and PipelineResponse received from the service.

Gets the PipelineResponse received from the service.