Azure / autorest.csharp

Extension for AutoRest (https://github.com/Azure/autorest) that generates C# code
MIT License
143 stars 166 forks source link

[Feature REQ] Split internal RestOperation classes from public Client classes for dpg like the other libraries #2925

Open m-nash opened 1 year ago

m-nash commented 1 year ago

If we put everything in one file it becomes a very massive file having 7844 lines in it. For readability we should split these up like we do in all other areas.

ArcturusZhang commented 1 year ago

I believe the file is long, because of the two following reasons:

  1. It really has many operations.
  2. Most of the lines in this file come from the helper method of pageable methods because we did not reuse the pageable protocol method, therefore each pageable method needs some helper methods to construct the request, and it needs to define a FirstPage local method and a NextPage local method.
ArcturusZhang commented 1 year ago

After the refactor @AlexanderSher has done (this PR), the content of the client should have been significantly reduced.

m-nash commented 1 year ago

Even with the reduction its still a break from all other libraries which doesn't have any value. Supporting multiple ways to generate the internal structures vs public structures is overhead we don't want.