Skip to content

建议扩展方法与所扩展的类型使用同一个命名空间 #1

@cnblogs-dudu

Description

@cnblogs-dudu

比如下面的扩展方法,如果命名空间改为 IEndpointRouteBuilder 所使用的 Microsoft.AspNetCore.Routing,调用时会更方便,不需要另外添加命名空间引用,智能感知直接就能出来

namespace Cnblogs.Architecture.Ddd.EventBus.Dapr;

public static IEndpointConventionBuilder Subscribe<TEvent>(this IEndpointRouteBuilder builder)
        where TEvent : IntegrationEvent
{
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions