josefpihrt / dotmarkdown

DotMarkdown is Markdown framework for .NET
https://josefpihrt.github.io/docs/dotmarkdown
Apache License 2.0
122 stars 9 forks source link

[Question] Perhaps the prefix "Write" for methods of an object MarkdownWriter is superfluous? #11

Closed inyutin-maxim closed 6 years ago

inyutin-maxim commented 6 years ago

Perhaps the prefix "Write" for methods of an object MarkdownWriter is superfluous?

josefpihrt commented 6 years ago

Frankly, I don't think that's a good idea.

Where does this idea come from if I may ask?

inyutin-maxim commented 6 years ago

If to look at a code in Readme.md you create MarkdownWriter object the task of which only to write, and it seems to me obvious that all its methods are engaged in the fact that they write data

var sb = new StringBuilder();

using (MarkdownWriter writer = MarkdownWriter.Create(sb))
{
    writer.WriteHeading1("Markdown Sample");
/// ...
    writer.WriteHorizontalRule();
}
josefpihrt commented 6 years ago

"...Writer" class with "Write..." methods is very standardized pattern that I intend to use.

inyutin-maxim commented 6 years ago

Ok, thanks. Also many thanks for Roslynator

josefpihrt commented 6 years ago

I'm glad you like it.