public static void GetEntityClient(
     [DurableClient] IDurableClient client,
     EntityId entityId,
     TestEntityClient[] clientRef)
 {
     // Give a client object created via the binding back to the caller
     clientRef[0] = new TestEntityClient(client, entityId);
 }
        public static async Task <TestEntityClient> GetEntityClientAsync(
            this JobHost host,
            EntityId entityId,
            ITestOutputHelper output)
        {
            var startFunction = typeof(ClientFunctions)
                                .GetMethod(nameof(ClientFunctions.GetEntityClient));

            var clientRef = new TestEntityClient[1];
            var args      = new Dictionary <string, object>
            {
                { "entityId", entityId },
                { "clientRef", clientRef },
            };

            await host.CallAsync(startFunction, args);

            TestEntityClient client = clientRef[0];

            return(client);
        }