public async stt::Task ListPlannableLocationsRequestObjectAsync() { moq::Mock <ReachPlanService.ReachPlanServiceClient> mockGrpcClient = new moq::Mock <ReachPlanService.ReachPlanServiceClient>(moq::MockBehavior.Strict); ListPlannableLocationsRequest request = new ListPlannableLocationsRequest { }; ListPlannableLocationsResponse expectedResponse = new ListPlannableLocationsResponse { PlannableLocations = { new PlannableLocation(), }, }; mockGrpcClient.Setup(x => x.ListPlannableLocationsAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <ListPlannableLocationsResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null)); ReachPlanServiceClient client = new ReachPlanServiceClientImpl(mockGrpcClient.Object, null); ListPlannableLocationsResponse responseCallSettings = await client.ListPlannableLocationsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); Assert.AreEqual(expectedResponse, responseCallSettings); ListPlannableLocationsResponse responseCancellationToken = await client.ListPlannableLocationsAsync(request, st::CancellationToken.None); Assert.AreEqual(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); }
/// <summary> /// Returns the list of plannable locations (for example, countries &amp; DMAs). /// </summary> /// <param name="request">The request object containing all of the parameters for the API call.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A Task containing the RPC response.</returns> public override stt::Task <ListPlannableLocationsResponse> ListPlannableLocationsAsync(ListPlannableLocationsRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_ListPlannableLocationsRequest(ref request, ref callSettings); return(_callListPlannableLocations.Async(request, callSettings)); }
partial void Modify_ListPlannableLocationsRequest(ref ListPlannableLocationsRequest request, ref gaxgrpc::CallSettings settings);
/// <summary> /// Returns the list of plannable locations (for example, countries &amp; DMAs). /// </summary> /// <param name="request">The request object containing all of the parameters for the API call.</param> /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param> /// <returns>A Task containing the RPC response.</returns> public virtual stt::Task <ListPlannableLocationsResponse> ListPlannableLocationsAsync(ListPlannableLocationsRequest request, st::CancellationToken cancellationToken) => ListPlannableLocationsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary> /// Returns the list of plannable locations (for example, countries &amp; DMAs). /// </summary> /// <param name="request">The request object containing all of the parameters for the API call.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A Task containing the RPC response.</returns> public virtual stt::Task <ListPlannableLocationsResponse> ListPlannableLocationsAsync(ListPlannableLocationsRequest request, gaxgrpc::CallSettings callSettings = null) => throw new sys::NotImplementedException();
/// <summary> /// Returns the list of plannable locations (for example, countries & DMAs). /// </summary> /// <param name="request"> /// The request object containing all of the parameters for the API call. /// </param> /// <param name="callSettings"> /// If not null, applies overrides to this RPC call. /// </param> /// <returns> /// The RPC response. /// </returns> public virtual ListPlannableLocationsResponse ListPlannableLocations( ListPlannableLocationsRequest request, gaxgrpc::CallSettings callSettings = null) { throw new sys::NotImplementedException(); }