Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Sep 3, 2020
1 parent 6341275 commit fe55286
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aspnetcore/grpc/protobuf.md
Expand Up @@ -133,7 +133,7 @@ message Person {
}
```

`wrappers.proto` types aren't exposed in generated properties. Protobuf automatically maps them to appropriate .NET nullable types when generating C# messages. For example, a `google.protobuf.Int32Value` field generates a `int?` property. Reference type properties like `string` and `ByteString` are unchanged except `null` can be assigned to them without error.
`wrappers.proto` types aren't exposed in generated properties. Protobuf automatically maps them to appropriate .NET nullable types in C# messages. For example, a `google.protobuf.Int32Value` field generates a `int?` property. Reference type properties like `string` and `ByteString` are unchanged except `null` can be assigned to them without error.

The following table shows the complete list of wrapper types with their equivalent C# type:

Expand Down Expand Up @@ -162,7 +162,7 @@ var payload = new PayloadResponse();
payload.Data = ByteString.CopyFrom(data);
```

A `ByteString`s data can be accessed directly using `ByteString.Span` or `ByteString.Memory`. Or call `ByteString.ToByteArray()` to convert an instance back into a byte array:
`ByteString` data is accessed directly using `ByteString.Span` or `ByteString.Memory`. Or call `ByteString.ToByteArray()` to convert an instance back into a byte array:

```csharp
var payload = await client.GetPayload(new PayloadRequest());
Expand Down

0 comments on commit fe55286

Please sign in to comment.