ClientResult<T>
Represents the result of a cloud service operation, and provides a
strongly-typed representation of the service response value.
using System.ClientModel.Primitives;
using System.Runtime.CompilerServices;
namespace System.ClientModel
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public class ClientResult<[System.Runtime.CompilerServices.Nullable(2)] T> : ClientResult
{
public virtual T Value { get; }
protected internal ClientResult(T value, PipelineResponse response)
: base(response)
{
Value = value;
}
public static implicit operator T(ClientResult<T> result)
{
if (result == null)
throw new ArgumentNullException("result", $"""{typeof(T)}""{typeof(T)}""{typeof(T)}""");
return result.Value;
}
}
}