Struct Status
Represents RPC result, which consists of StatusCode and an optional detail string.
Namespace: Grpc.Core
Assembly: Grpc.Core.Api.dll
Syntax
public struct Status
Constructors
Status(StatusCode, String)
Creates a new instance of Status
.
Declaration
public Status(StatusCode statusCode, string detail)
Parameters
Type | Name | Description |
---|---|---|
StatusCode | statusCode | Status code. |
System.String | detail | Detail. |
Fields
DefaultCancelled
Default result of a cancelled RPC. StatusCode=Cancelled, empty details message.
Declaration
public static readonly Status DefaultCancelled
Field Value
Type | Description |
---|---|
Status |
DefaultSuccess
Default result of a successful RPC. StatusCode=OK, empty details message.
Declaration
public static readonly Status DefaultSuccess
Field Value
Type | Description |
---|---|
Status |
Properties
Detail
Gets the detail.
Declaration
public string Detail { get; }
Property Value
Type | Description |
---|---|
System.String |
StatusCode
Gets the gRPC status code. OK indicates success, all other values indicate an error.
Declaration
public StatusCode StatusCode { get; }
Property Value
Type | Description |
---|---|
StatusCode |
Methods
ToString()
Returns a
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |