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

Кашин Александр #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MrSasha00
Copy link

No description provided.

private readonly App _app;
private readonly ISettingsProvider _settingsProvider;

public ConsoleClient(App app, ISettingsProvider settingsProvider)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хотелось бы, чтобы клиенты были в отдельном запускаемом проекте (для каждого свой), а весь код облака тегов был доступен в виде ограниченного набора классов из библиотеки

TagCloud/Settings/ISettingsProvider.cs Outdated Show resolved Hide resolved
TagCloud/Settings/Settings.cs Outdated Show resolved Hide resolved
TagCloud/TagPositioner/TagPositioner.cs Outdated Show resolved Hide resolved
TagCloud/TagPositioner/TagPositioner.cs Outdated Show resolved Hide resolved
TagCloud/WordCounter/Tag.cs Show resolved Hide resolved
TagCloud/WordsProcessing/DefaultBoringWordProvider.cs Outdated Show resolved Hide resolved
TagCloud/WordsProcessing/WordPreprocessor.cs Outdated Show resolved Hide resolved
_wordsReader = wordsReader;
_settingsProvider = settingsProvider;
}
public IEnumerable<string> Process()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Довай отрефакторим проект (расставим пробельные символы и переносы строк верно), у райдера есть специальная команда для этого, если ты в нем работаешь

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Прошелся решарпером

TagCloud/Settings/AppSettings.cs Outdated Show resolved Hide resolved

public class AppSettingsProvider : IAppSettingsProvider
{
public AppSettings AppSettings { get; set; } = null!;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Та же проблема - #19 (comment)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В целом в рамках приложения как будто логично сделать настройки статичными, либо явно передавать их параметром в код библиотеки (облака тегов), потому что сейчас их можно в любой момент из любого места пререопределить

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Решил на вход в библиотеку принимать настройки и сетить в провайдеры. Сами провайдеры сделал internal.

graphics.DrawString(tag.Word, font, brush, tag.Location);
}

bitmap.Save(appSettingsProvider.AppSettings.SavePath, System.Drawing.Imaging.ImageFormat.Png);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вот этот метод не выглядит гибким, на мой взгляд, svg сложно будет в текущий код добавить

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Выделил в отдельный класс для сохранения

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

Successfully merging this pull request may close these issues.

2 participants