<PackageReference Include="Azure.Core" Version="1.47.2" />

NullableResponse<T>

public abstract class NullableResponse<T>
Represents a result of Azure operation.
using System.ComponentModel; using System.Runtime.CompilerServices; namespace Azure { [NullableContext(2)] [Nullable(0)] public abstract class NullableResponse<T> { [Nullable(1)] private const string NoValue = "<null>"; public abstract bool HasValue { get; } public abstract T Value { get; } [NullableContext(1)] public abstract Response GetRawResponse(); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) { return base.Equals(obj); } [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() { return base.GetHashCode(); } [NullableContext(1)] public override string ToString() { DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(17, 2); defaultInterpolatedStringHandler.AppendLiteral("Status: "); defaultInterpolatedStringHandler.AppendFormatted<int?>(GetRawResponse()?.Status); defaultInterpolatedStringHandler.AppendLiteral(", Value: "); defaultInterpolatedStringHandler.AppendFormatted(HasValue ? ((object)Value) : "<null>", 0, null); return defaultInterpolatedStringHandler.ToStringAndClear(); } } }