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

Rename EndpointParser? #154

Closed
martincostello opened this issue Dec 13, 2018 · 2 comments
Closed

Rename EndpointParser? #154

martincostello opened this issue Dec 13, 2018 · 2 comments
Labels
Milestone

Comments

@martincostello
Copy link
Member

I just stumbled across this comment: https://github.com/justeat/JustEat.StatsD/blob/2c989e99cd9cfe0827d147d5b2cbbf9e35d561b0/src/JustEat.StatsD/EndpointLookups/EndpointParser.cs#L6

Should we rename this type as suggested, or just remove the comment?

At a minimum we should probably rename to EndPointParser (capital P) if we don't want to make it a factory.

@martincostello martincostello added this to the v4.0.0 milestone Dec 13, 2018
@AnthonySteele
Copy link
Contributor

My opinions on the naming aren't strong. The parsing happens on line 62: if (IPAddress.TryParse(host, out IPAddress address)) and with the various other checks on param values.

I think it's correct that this class is more of a factory or builder of IEndPointSource instances than it is a parser (it calls TryParse on another class, it does not implement it) and the naming could be changed to match.

@martincostello
Copy link
Member Author

I'll do a PR to tweak it shortly then, once I've finished my pass of the docs for #130 that I'm half-way through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants