dolittle/DotNET.SDK

View on GitHub
Source/Tenancy.Client/Internal/TenantsGetAllMethod.cs

Summary

Maintainability
A
1 hr
Test Coverage
F
0%
// Copyright (c) Dolittle. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using Dolittle.Runtime.Tenancy.Contracts;
using Dolittle.SDK.Services;
using Grpc.Core;

namespace Dolittle.SDK.Tenancy.Client.Internal;

/// <summary>
/// Represents a wrapper for gRPC Tenants.GetAll.
/// </summary>
public class TenantsGetAllMethod : ICanCallAUnaryMethod<GetAllRequest, GetAllResponse>
{
    /// <inheritdoc/>
    public AsyncUnaryCall<GetAllResponse> Call(GetAllRequest message, ChannelBase channel, CallOptions callOptions)
    {
        var client = new Dolittle.Runtime.Tenancy.Contracts.Tenants.TenantsClient(channel);
        return client.GetAllAsync(message, callOptions);
    }
}