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

Яценко Ирина #174

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

Conversation

lholypeachy
Copy link

Comment on lines 2 to 4
{
public class Result<T>
{

Choose a reason for hiding this comment

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

Чаще всего используют вот эту реализацию https://github.com/kontur-courses/fp/blob/master/ErrorHandling/Result.cs при выполнении этого задания. У тебя немного она отличается. Она заставляет тебя больше писать try catch. В целом я больше за твой вариант, т.к похожий я использую у себя в команде

Comment on lines 9 to 16
public Result(T value, string error)
{
Value = value;
Error = error;
}

public static Result<T> Success(T value) => new Result<T>(value, null);
public static Result<T> Failure(string error) => new Result<T>(default, error);

Choose a reason for hiding this comment

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

Добавить конструктор по умолчанию добавили, но использовать не стала, а надобы
Я бы основной конструктор сделал бы private, т.к есть статичные методы которые выступают гарантией, что его вызывать нужно только вот так

Comment on lines +6 to +8
namespace TagsCloudVisualization
{
public class CircularCloudLayouter : ICircularCloudLayouter

Choose a reason for hiding this comment

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

Не вижу использование в этом проекте патерна, да и ошибки вот прямо в классе выкидываются

Comment on lines 24 to 25
if (cloud.Rectangles.Count == 0)
return AddToCenterPosition(rectangleSize);

Choose a reason for hiding this comment

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

Немного странный метод, т.к. первая точка которую ты возвращаешь это всегда центр

Comment on lines 53 to 54


Choose a reason for hiding this comment

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

два переноса

Comment on lines +22 to +25

public Result<Bitmap> DrawWordsCloud(string filePath, VisualizingSettings visualizingSettings)
{
if (filePath == null)

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