Skip to content

Commit

Permalink
fix: Include the final argument in method signatures transformed into…
Browse files Browse the repository at this point in the history
… blocks (e.g. for pagination)
  • Loading branch information
jskeet committed Jul 24, 2024
1 parent ce8c0fe commit a2d7f8f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return SignatureMethod(request);
return SignatureMethod(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -115,7 +115,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return SignatureMethodAsync(request);
return SignatureMethodAsync(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -147,7 +147,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return SignatureMethod(request);
return SignatureMethod(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -179,7 +179,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return SignatureMethodAsync(request);
return SignatureMethodAsync(request, callSettings);
}

/// <summary>
Expand All @@ -206,7 +206,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return SignatureMethod(request);
return SignatureMethod(request, callSettings);
}

/// <summary>
Expand All @@ -233,7 +233,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return SignatureMethodAsync(request);
return SignatureMethodAsync(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -301,7 +301,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return ResourcedMethod(request);
return ResourcedMethod(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -331,7 +331,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return ResourcedMethodAsync(request);
return ResourcedMethodAsync(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -361,7 +361,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return ResourcedMethod(request);
return ResourcedMethod(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -391,7 +391,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return ResourcedMethodAsync(request);
return ResourcedMethodAsync(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -427,7 +427,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return ResourcedMethod(request);
return ResourcedMethod(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -463,7 +463,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return ResourcedMethodAsync(request);
return ResourcedMethodAsync(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -499,7 +499,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return ResourcedMethod(request);
return ResourcedMethod(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -535,7 +535,7 @@ public abstract class PaginatedClient
{
request.PageSize = pageSize.Value;
}
return ResourcedMethodAsync(request);
return ResourcedMethodAsync(request, callSettings);
}
// TEST_END
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ public virtual void DeleteBlurb(BlurbName name, gaxgrpc::CallSettings callSettin
{
request.PageSize = pageSize.Value;
}
return ListBlurbs(request);
return ListBlurbs(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -1420,7 +1420,7 @@ public virtual void DeleteBlurb(BlurbName name, gaxgrpc::CallSettings callSettin
{
request.PageSize = pageSize.Value;
}
return ListBlurbsAsync(request);
return ListBlurbsAsync(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -1454,7 +1454,7 @@ public virtual void DeleteBlurb(BlurbName name, gaxgrpc::CallSettings callSettin
{
request.PageSize = pageSize.Value;
}
return ListBlurbs(request);
return ListBlurbs(request, callSettings);
}

/// <summary>
Expand Down Expand Up @@ -1488,7 +1488,7 @@ public virtual void DeleteBlurb(BlurbName name, gaxgrpc::CallSettings callSettin
{
request.PageSize = pageSize.Value;
}
return ListBlurbsAsync(request);
return ListBlurbsAsync(request, callSettings);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private MethodDeclarationSyntax AbstractRequestMethod(bool sync, bool callSettin
var type = Ctx.Type(MethodDetails.RequestTyp);
var request = Local(Ctx.Type(MethodDetails.RequestTyp), "request").WithInitializer(newRequest);
var statements = requestBlock(request);
block = new[] { request }.Concat(statements).Append(Return(This.Call(methodName)(request))).ToArray();
block = new[] { request }.Concat(statements).Append(Return(This.Call(methodName)(request, finalParam))).ToArray();
}
var method = Method(Public | Virtual, Ctx.Type(returnTyp), methodName)(parameters.Select(x => x.Parameter).Append(finalParam).ToArray())
.MaybeWithAttribute(MethodDetails.IsDeprecated || _sig.HasDeprecatedField, () => Ctx.Type<ObsoleteAttribute>())()
Expand Down

0 comments on commit a2d7f8f

Please sign in to comment.