Class Terrain.TerrainClient
Client for Terrain
Inherited Members
Namespace: TerraProc.Grpc
Assembly: TerraProc.Contracts.dll
Syntax
public class Terrain.TerrainClient : ClientBase<Terrain.TerrainClient>
Constructors
| Edit this page View SourceTerrainClient()
Protected parameterless constructor to allow creation of test doubles.
Declaration
protected TerrainClient()
TerrainClient(CallInvoker)
Creates a new client for Terrain that uses a custom CallInvoker.
Declaration
public TerrainClient(CallInvoker callInvoker)
Parameters
| Type | Name | Description |
|---|---|---|
| CallInvoker | callInvoker | The callInvoker to use to make remote calls. |
TerrainClient(ChannelBase)
Creates a new client for Terrain
Declaration
public TerrainClient(ChannelBase channel)
Parameters
| Type | Name | Description |
|---|---|---|
| ChannelBase | channel | The channel to use to make remote calls. |
TerrainClient(ClientBaseConfiguration)
Protected constructor to allow creation of configured clients.
Declaration
protected TerrainClient(ClientBase.ClientBaseConfiguration configuration)
Parameters
| Type | Name | Description |
|---|---|---|
| ClientBase.ClientBaseConfiguration | configuration | The client configuration. |
Methods
| Edit this page View SourceGetChunk(ChunkCoords, CallOptions)
Retrieves a terrain chunk based on its coordinates
Declaration
public virtual Chunk GetChunk(ChunkCoords request, CallOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| ChunkCoords | request | The request to send to the server. |
| CallOptions | options | The options for the call. |
Returns
| Type | Description |
|---|---|
| Chunk | The response received from the server. |
GetChunk(ChunkCoords, Metadata, DateTime?, CancellationToken)
Retrieves a terrain chunk based on its coordinates
Declaration
public virtual Chunk GetChunk(ChunkCoords request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ChunkCoords | request | The request to send to the server. |
| Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
| DateTime? | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
| CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
| Type | Description |
|---|---|
| Chunk | The response received from the server. |
GetChunkAsync(ChunkCoords, CallOptions)
Retrieves a terrain chunk based on its coordinates
Declaration
public virtual AsyncUnaryCall<Chunk> GetChunkAsync(ChunkCoords request, CallOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| ChunkCoords | request | The request to send to the server. |
| CallOptions | options | The options for the call. |
Returns
| Type | Description |
|---|---|
| AsyncUnaryCall<Chunk> | The call object. |
GetChunkAsync(ChunkCoords, Metadata, DateTime?, CancellationToken)
Retrieves a terrain chunk based on its coordinates
Declaration
public virtual AsyncUnaryCall<Chunk> GetChunkAsync(ChunkCoords request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ChunkCoords | request | The request to send to the server. |
| Metadata | headers | The initial metadata to send with the call. This parameter is optional. |
| DateTime? | deadline | An optional deadline for the call. The call will be cancelled if deadline is hit. |
| CancellationToken | cancellationToken | An optional token for canceling the call. |
Returns
| Type | Description |
|---|---|
| AsyncUnaryCall<Chunk> | The call object. |
NewInstance(ClientBaseConfiguration)
Creates a new instance of client from given ClientBaseConfiguration.
Declaration
protected override Terrain.TerrainClient NewInstance(ClientBase.ClientBaseConfiguration configuration)
Parameters
| Type | Name | Description |
|---|---|---|
| ClientBase.ClientBaseConfiguration | configuration |
Returns
| Type | Description |
|---|---|
| Terrain.TerrainClient |