API client logs [csharp-client]
Add logs for most common operations. To implement logging, it's required to implement partial methods of Logger.cs #5355 suggestion issue
It's a second attempt to implement logs. The previous one ( #5424 ) had a lot of comments and suggestions from @wing328 and from @jimschubert . The fastest way is to throw all my changes out (which I made when mistakenly thought they would improve the client) and make only required functions. Please review again and give feedback.
@iamkarlson thanks for the PR. I'll review later this week.
@iamkarlson Please run .\bin\windows\csharp-petstore-all.bat to update the C# Petstore samples.
I got compilation errors after updating the samples:
Using shared compilation with compiler from directory: C:\Program Files (x86)\MSBuild\14.0\Bin
Client\ApiClient.cs(203,58): error CS1026: ) expected [C:\projects\swagger-codegen-wh2wu\samples\client\petstore\csharp\SwaggerClient\src\IO.Swagger\IO.Swagger.csproj]
Client\ApiClient.cs(211,37): error CS1002: ; expected [C:\projects\swagger-codegen-wh2wu\samples\client\petstore\csharp\SwaggerClient\src\IO.Swagger\IO.Swagger.csproj]
Client\ApiClient.cs(241,43): error CS1002: ; expected [C:\projects\swagger-codegen-wh2wu\samples\client\petstore\csharp\SwaggerClient\src\IO.Swagger\IO.Swagger.csproj]
Client\Configuration.cs(53,44): error CS1002: ; expected [C:\projects\swagger-codegen-wh2wu\samples\client\petstore\csharp\SwaggerClient\src\IO.Swagger\IO.Swagger.csproj]
Done Building Project "C:\projects\swagger-codegen-wh2wu\samples\client\petstore\csharp\SwaggerClient\src\IO.Swagger\IO.Swagger.csproj" (default targets) -- FAILED.
Ref: https://ci.appveyor.com/project/WilliamCheng/swagger-codegen-wh2wu/build/iamkarlson-logs_csharp-4170
@wing328 I tried to update samples but got an error with enum class. So I don't know is it my configuration or something wrong with code but appveyor built solution properly and there are no errors.
Could you check it again? If it's still impossible to push these changes without updating samples I'll check out my branch from scratch and run again. however, it can take time..
@wing328 So, I clean my local repo and then go step by step. I suppose I fixed all issues, pls review.
@iamkarlson thanks for fix. Most issues are gone except the following:

I'm using Xamarin 6.2 on MacOS with Mono 4.8.1
Did you get similar error locally?
CI (AppVeyor) also reports similar issues: https://ci.appveyor.com/project/WilliamCheng/swagger-codegen-wh2wu/build/iamkarlson-logs_csharp-4358
Those errors should occur on IDEs in Windows as well. A partial is like an interface which defaults to no implementation, so I'd expect the same errors you'd have for interfaces.
@jimschubert do you remember you asked me in previous pr why I used public methods for wrappers? here That's why. I've remembered.
@iamkarlson Sorry my comment on your previous PR wasn't clear.
Do you think it would make more sense to have
public void Trace(string message)
{
TraceHandler(message);
}
partial void TraceHandler(string message);
This way you have the Trace method consumed by the client code as you have now, and you have the partial extension point as you had before but it's not embedding C# keywords TracePartial as it was before. This naming of TracePartial was my main concern and I didn't convey it correctly, sorry about that (I reread my post and I had a lot of stuff in that comment that was very confusing).
@jimschubert I'll try to work it out upcoming week. Maybe I'll find out another workaround
Sounds good. I'll review again later, then. Sorry again for any confusion my comments on your other PR may have caused.
@jimschubert I haven't found out any other workaround for that. Only public wrappers for partial methods. Pls review