Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove usage of optional arguments to public methods #779

Closed
@haacked

Description

@haacked

I noticed in a recent update to LibGit2Sharp that the IRepository interface added methods that contain optional parameters.

This can lead to subtle and very bad versioning problems that could cause ambiguous method resolution at runtime etc.

Since LibGit2Sharp is a library used by many apps, I'd recommend using overloads rather than optional parameters.

Or in the case of an interface, only have the method that contains the full set of arguments and add helpful extension methods to the interface that provide default values for the less used arguments.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions