Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGE: Remove 'EntityId' property from 'PlayerInfo' class #53

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

MrDave1999
Copy link
Owner

@MrDave1999 MrDave1999 commented Sep 4, 2024

It is not necessary to couple the PlayerInfo class with the EntityId type of SampSharp.

return carrier.Entity == EntityId;

The comparison can be done using the player's name.

The disadvantage of having an EntityId property, is that it enters in confusion with the AccountId property, at first glance the consumer does not know what the difference between them is, unless they checks the XML comments.

This introduces a breaking change in the public API, so the EntityId would also have to be removed from the GetOrDefault method of the repository.

It is not necessary to couple the "PlayerInfo" class with the "EntityId" type of SampSharp.

The disadvantage of having an "EntityId" property, is that it enters in confusion with the AccountId property, at first sight the consumer does not know what is the difference between them, unless he checks the XML comments.
@MrDave1999 MrDave1999 added the breaking-change Change API design or behavior label Sep 4, 2024
@MrDave1999 MrDave1999 marked this pull request as ready for review September 4, 2024 13:55
@MrDave1999 MrDave1999 merged commit b9c5d48 into dev Sep 4, 2024
1 check passed
@MrDave1999 MrDave1999 deleted the breaking-change branch September 4, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Change API design or behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant