-
-
Notifications
You must be signed in to change notification settings - Fork 811
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
Assert SOLID design principles #12
Comments
Let me know if you have any specific issues. |
My concern here is how much of an effort it would be to break out an index-only API. I see some effort around a Command pattern also, but no Response pattern, per se, which is equally part of the protocol reading and parsing received lines from server. Something like: class Pop3Command
{
}
class Pop3Response
{
}
class Pop3Transaction<TCommand, TResponse>
where TCommand : Pop3Command
where TResponse : Pop3Response
{
} Where command is pretty much responsible for writing through the Stream and Response is responsible for reading from the Stream. Key point being: writing and/or reading is done once, in one place, instead of repeating greeting = ReadLine, pattern I am seeing. And so on. What I am mulling over is whether I would want to contribute along these lines. |
What do you mean break out an index-only API? |
FWIW, the Command/Handler pattern I'm using is simpler and more efficient than a Command/Response pattern you are talking about would be. I still don't know what you mean by breaking out an index-only API, though. That doesn't make any sense to me because there's already an index-based API that you can use if you don't want to use the UID-based API. |
I think I see in the GetMessageForSequenceId API. I will have a closer gander through that lens. Thank ye... |
GetMessageForSequenceId is internal, you want Pop3Client.GetMessage (int index, CancellationToken token) |
TBD: I am evaluating MailKit for fitness whether it will do what I need it to do; or at least be open enough for extensibility (i.e. along SOLID design principle guidelines). TBD whether there are any issues come up along these lines.
So far what I can determine is the index-UID issue (another issue) is fairly substantial. After that I look for obvious opportunities; virtualized methods and properties, abstract classes that need to be, non-sealed classes that don't need to be, things of this nature.
Possibly more to come...
The text was updated successfully, but these errors were encountered: