-
Notifications
You must be signed in to change notification settings - Fork 319
черновик декомпозиции для MarkDown процессора #265
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| public class TextHTML | ||
| { | ||
| string html_data_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В C# принят camelCase, давай здесь и дальше по коду этого придерживаться?
| @@ -0,0 +1,8 @@ | |||
| namespace DefaultNamespace; | |||
|
|
|||
| public class TextHTML | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А для чего нужен отдельный тип, который оборачивает строку? Какую логику он будет в себе инкапсулировать?
| {} | ||
| string Data | ||
| { | ||
| get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно писать просто get;, если не требуется какая-то особая логика при получении значения
|
|
||
| TextMarkDown(string text) // Берёт текст и заполняет массив token | ||
| {} | ||
| string Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут не хватает модификатора + ниже тоже
| private Tuple<int, int> index_; //содержание токена, индекс начала и конца | ||
| TokenType TokenType | ||
| { | ||
| get { return type; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут тоже достаточно { get; set; }. Расписывать базовую реализацию не нужно
| public class Token | ||
| { | ||
| private TokenType type_; //тип токена | ||
| private Tuple<int, int> index_; //содержание токена, индекс начала и конца |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Скорее всего это не индекс, а какой-то отрезок или интервал. Давай подберем более говорящее название? + Кортеж значений вида (int Begin, int End) ... будет выглядеть чуть прозрачнее, посмотри в эту сторону. Будет круто, если опишешь преимущества такого типа над обычным Tupl'ом
| { | ||
| Italic, | ||
| Bold, | ||
| Escaped, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Подсвети, пожалуйста, что это за тип токена? + Понадобится ли тип Text?
|
Относится ко всему решению |
No description provided.