Skip to content

I18NExtension.Tanslate 的 fallback overload 返回值应不应为 null #23

Description

@Misaka-L

一种可能的解决方案是,将 Translate 方法分为不带 fallback 和带 fallback 的 overload。

但是这会破坏 ABI 兼容性(不破坏代码兼容性)。

不过考虑到 2.x 目前还是测试阶段,也许是可能接受的方案。

或者通过 Attribute 告诉编译器返回值在 fallback 不为 null 时也不为 null。

我会在空闲的时候弄一个 Pull Request。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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