Skip to content

Remove assembly full name from generated HttpClient name #1467

Description

@yohny

When Refit is used with a logging library like serilog that logs the context of a log message (typically a class where log originated) the generated Refit HttpClient name causes log to be hard to read as its very long.
An example of the generated name: System.Net.Http.HttpClient.Refit.Implementation.Generated+SerilogRefiReproControllersIApi, SerilogRefiRepro, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
The implementation is in

var assmQualified = $"{refitTypeName}, {refitInterfaceType.Assembly.FullName}";
where its clear that asembly full name is appended.
I asked for reasoning of such naming in discussion #1464, but got no answer.
Related issue in serilog that resulted in this feature request serilog/serilog#1793

Describe the solution you'd like
The generated class name would be simlified - no asembly full name would be present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions