Skip to content

Configure/Override Service Naming #1029

@jeff-at-trimble

Description

@jeff-at-trimble

Problem

MagicOnion seems to just use simple type name for services, rather than the full type name (including namespace). For example:

namespace MySystem.Manager.Admin.Employee 
{
    public interface IProfileAccess {}
}

namespace MySystem.Manager.Admin.Employee 
{
    public interface IProfileAccess {}
}

Options

Option A - Naming Convention (PREFERRED)

Something like this:

builder.Services.AddMagicOnion(options =>
{
    options.ServiceDefinitionConfig.NameStrategy = (Type type) => type.FullName;
});

Option B - Attribute

Provide an attribute that can be applied to the service interface with a string that becomes the service name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions