Skip to content

使用partial关键字对大文件进行拆分 #27

Description

@wsy

你们的SDK里有很多上万行的大文件,建议进行拆分。
.Net从很久以前就支持partial关键字,把一个class拆到多个文件里。

比如.Net Runtime的TimeZone类,就拆分了很多文件。
Example

具体到你们sdk里,比如:

https://github.com/aliyun/alibabacloud-csharp-sdk/blob/master/ecs-20140526/core/Client.cs

这个文件3.xMiB,6万多行。
可以改成partial class,按功能拆成Client.Feature1.csClient.Feature2.cs,增加可维护性。

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