-
Notifications
You must be signed in to change notification settings - Fork 32
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
Бочаров Александр #12
Open
Geratoptus
wants to merge
29
commits into
kontur-courses:master
Choose a base branch
from
Geratoptus:TagCloud
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c6cd6bc
init(TagCloud|TagCloudTests): инициализировал TagCloud с тестами
Geratoptus 3d5fbcd
init(TagCloud): набросок архитектуры
Geratoptus 5b49d2c
add(CircularCloudLayouter): перенес решение из прошлого задания с тес…
Geratoptus 4a9234e
add(FileReader.cs): реализовал FileReader
Geratoptus b962771
add(FileReaderTest.cs): добавил тест для FileReader'а
Geratoptus 299a1cc
feat(TagCloud|TagCloudTests): поставил Hunspell для работы со словами
Geratoptus c398841
feat(TagCloud|TagCloudTests): поставил Autofac для настройки зависимо…
Geratoptus aa27044
feat(LowerCaseFilter.cs): написал фильтр на регистр
Geratoptus 49082ad
feat(BoringWordsFilter.cs): написал фильт на скучные слова
Geratoptus 7489c62
add(FilterTests): написал тесты для фильтров
Geratoptus b2d30b2
feat(TagCloud): вынес клиента в отдельный проект
Geratoptus 891ea0e
feat(TagCloud): добавил Options для консоли
Geratoptus 46bc1b2
feat(TagCloud): добавил зависимости от BitmapGenerator'а и от Circula…
Geratoptus d3ff1b0
fix(CircularCloudLayouter): понял, что для этой задачи лучше начинать…
Geratoptus 4fedef7
add(ImageSaver): выделил сохранялку картинок
Geratoptus bc29220
feat(BitmapGenerator): внедрил BitmapSettings.cs
Geratoptus 618da34
add(CsvFileReader.cs): добавил ридера для .csv файлов
Geratoptus 6e45f06
add(WordFileReader.cs): добавил ридера для .docx файлов
Geratoptus 954b0d5
feat(Options.cs): добавил настройку культуры для .csv и разделил imag…
Geratoptus ba7c531
feat(CloudGenerator.cs): работающий CloudGenerator
Geratoptus 49a3f7f
feat(SettingsFactory): добавил билдеры для новых ридеров и сейвера
Geratoptus 0b6ccaf
feat(Program.cs): добавил настройку всех новых зависимостей
Geratoptus 673b1fb
feat(TagCloudClient): добавил примеры работы, в csproj подгрузил все …
Geratoptus 3982fce
feat(TagClodTests): добавил тесты
Geratoptus bec6bbf
feat(TagClodTests): добавил тесты
Geratoptus b510d67
add(IOptions|SettingsBuilder): вынес настройку зависимостей в отдельн…
Geratoptus dbde033
refactor(Program|SettingsFactory):
Geratoptus ae4cb13
refactor(FermatSpiralPointsGeneratorTest): оказывается я пивной бочонок
Geratoptus 3a97138
Merge remote-tracking branch 'origin/TagCloud' into TagCloud
Geratoptus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using TagCloud.WordsFilter; | ||
using TagCloud.WordsReader; | ||
using TagCloud.ImageGenerator; | ||
using TagCloud.ImageSaver; | ||
|
||
namespace TagCloud; | ||
|
||
public class CloudGenerator( | ||
IImageSaver saver, | ||
IWordsReader reader, | ||
BitmapGenerator imageGenerator, | ||
IEnumerable<IWordsFilter> filters) | ||
{ | ||
private const int MinFontSize = 10; | ||
private const int MaxFontSize = 80; | ||
public string GenerateTagCloud() | ||
{ | ||
var words = reader.ReadWords(); | ||
|
||
var freqDict = filters | ||
.Aggregate(words, (c, f) => f.ApplyFilter(c)) | ||
.GroupBy(w => w) | ||
.OrderByDescending(g => g.Count()) | ||
.ToDictionary(g => g.Key, g => g.Count()); | ||
|
||
var maxFreq = freqDict.Values.Max(); | ||
var tagsList = freqDict.Select(pair => ToWordTag(pair, maxFreq)).ToList(); | ||
|
||
return saver.Save(imageGenerator.GenerateWindowsBitmap(tagsList)); | ||
} | ||
|
||
private static int TransformFreqToSize(int freq, int maxFreq) | ||
=> (int)(MinFontSize + (float)freq / maxFreq * (MaxFontSize - MinFontSize)); | ||
|
||
private static WordTag ToWordTag(KeyValuePair<string, int> pair, int maxFreq) | ||
=> new(pair.Key, TransformFreqToSize(pair.Value, maxFreq)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace TagCloud.CloudLayouter.Extensions; | ||
|
||
public static class EnumeratorExtension | ||
{ | ||
public static IEnumerable<T> ToIEnumerable<T>(this IEnumerator<T> enumerator) { | ||
while ( enumerator.MoveNext() ) { | ||
yield return enumerator.Current; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Drawing; | ||
|
||
namespace TagCloud.CloudLayouter.Extensions; | ||
|
||
public static class RandomExtension | ||
{ | ||
public static Size RandomSize(this Random random, int minValue=1, int maxValue=int.MaxValue) | ||
{ | ||
if (minValue <= 0) | ||
throw new ArgumentOutOfRangeException(nameof(minValue), "minValue must be positive"); | ||
if (minValue > maxValue) | ||
throw new ArgumentOutOfRangeException(nameof(minValue), "minValue must be less than maxValue"); | ||
|
||
|
||
return new Size(random.Next(minValue, maxValue), random.Next(minValue, maxValue)); | ||
} | ||
|
||
|
||
public static Point RandomPoint(this Random random, int minValue=int.MinValue, int maxValue=int.MaxValue) | ||
{ | ||
return new Point(random.Next(minValue, maxValue), random.Next(minValue, maxValue)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Drawing; | ||
|
||
namespace TagCloud.CloudLayouter.Extensions; | ||
|
||
public static class RectangleExtension | ||
{ | ||
public static Rectangle CreateRectangleWithCenter(this Rectangle rectangle, Point center, Size rectangleSize) | ||
{ | ||
var x = center.X - rectangleSize.Width / 2; | ||
var y = center.Y - rectangleSize.Height / 2; | ||
return new Rectangle(x, y, rectangleSize.Width, rectangleSize.Height); | ||
} | ||
|
||
public static double GetDistanceToMostRemoteCorner(this Rectangle rectangle, Point startingPoint) | ||
{ | ||
Point[] corners = [ | ||
new(rectangle.X, rectangle.Y), | ||
new(rectangle.X + rectangle.Width, rectangle.Y), | ||
new(rectangle.X, rectangle.Y + rectangle.Height), | ||
new(rectangle.X + rectangle.Width, rectangle.Y + rectangle.Height)]; | ||
return corners.Max(corner => | ||
Math.Sqrt((startingPoint.X - corner.X) * (startingPoint.X - corner.X) + | ||
(startingPoint.Y - corner.Y) * (startingPoint.Y - corner.Y))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System.Drawing; | ||
|
||
namespace TagCloud.CloudLayouter; | ||
|
||
public interface ICloudLayouter | ||
{ | ||
public Rectangle PutNextRectangle(Size rectangleSize); | ||
} |
42 changes: 42 additions & 0 deletions
42
TagCloud/CloudLayouter/PointLayouter/CircularCloudLayouter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System.Drawing; | ||
using TagCloud.CloudLayouter.Extensions; | ||
using TagCloud.CloudLayouter.PointLayouter.Generators; | ||
using TagCloud.CloudLayouter.PointLayouter.Settings; | ||
|
||
namespace TagCloud.CloudLayouter.PointLayouter; | ||
|
||
public class CircularCloudLayouter(Point layoutCenter, IPointsGenerator pointsGenerator) : ICloudLayouter | ||
{ | ||
private const string FiniteGeneratorExceptionMessage = | ||
"В конструктор CircularCloudLayouter был передан конечный генератор точек"; | ||
|
||
private readonly List<Point> _placedPoints = []; | ||
private readonly List<Rectangle> _layoutRectangles = []; | ||
|
||
public CircularCloudLayouter(Point layoutCenter, double radius, double angleOffset) : | ||
this(layoutCenter, new FermatSpiralPointsGenerator(radius, angleOffset)) | ||
{ | ||
} | ||
|
||
public CircularCloudLayouter(PointLayouterSettings settings) | ||
: this(settings.Center, settings.Generator) | ||
{ | ||
} | ||
|
||
public Rectangle PutNextRectangle(Size rectangleSize) | ||
{ | ||
var rectangle = pointsGenerator | ||
.GeneratePoints(layoutCenter) | ||
.Except(_placedPoints) | ||
.Select(point => new Rectangle() | ||
.CreateRectangleWithCenter(point, rectangleSize)) | ||
.FirstOrDefault(rectangle => !_layoutRectangles.Any(rectangle.IntersectsWith)); | ||
|
||
if (rectangle.IsEmpty) | ||
throw new InvalidOperationException(FiniteGeneratorExceptionMessage); | ||
|
||
_placedPoints.Add(rectangle.Location - rectangleSize / 2); | ||
_layoutRectangles.Add(rectangle); | ||
return rectangle; | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
TagCloud/CloudLayouter/PointLayouter/Generators/FermatSpiralPointsGenerator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System.Drawing; | ||
using TagCloud.CloudLayouter.PointLayouter.Settings.Generators; | ||
|
||
namespace TagCloud.CloudLayouter.PointLayouter.Generators; | ||
|
||
public class FermatSpiralPointsGenerator : IPointsGenerator | ||
{ | ||
private readonly double _angleOffset; | ||
private readonly double _radius; | ||
|
||
private double OffsetPerRadian => _radius / (2 * Math.PI); | ||
|
||
public FermatSpiralPointsGenerator(double radius, double angleOffset) | ||
{ | ||
if (radius <= 0) | ||
throw new ArgumentException("radius must be greater than 0", nameof(radius)); | ||
if (angleOffset <= 0) | ||
throw new ArgumentException("angleOffset must be greater than 0", nameof(angleOffset)); | ||
|
||
_angleOffset = angleOffset * Math.PI / 180; | ||
_radius = radius; | ||
} | ||
|
||
public FermatSpiralPointsGenerator(FermatSpiralSettings settings) | ||
: this(settings.Radius, settings.AngleOffset) | ||
{ | ||
} | ||
|
||
public IEnumerable<Point> GeneratePoints(Point spiralCenter) | ||
{ | ||
double angle = 0; | ||
|
||
while (true) | ||
{ | ||
yield return GetPointByPolarCoordinates(spiralCenter, angle); | ||
angle += _angleOffset; | ||
} | ||
// ReSharper disable once IteratorNeverReturns | ||
} | ||
|
||
private Point GetPointByPolarCoordinates(Point spiralCenter, double angle) | ||
{ | ||
var radiusVector = OffsetPerRadian * angle; | ||
|
||
var x = (int)Math.Round( | ||
radiusVector * Math.Cos(angle) + spiralCenter.X); | ||
var y = (int)Math.Round( | ||
radiusVector * Math.Sin(angle) + spiralCenter.Y); | ||
|
||
return new Point(x, y); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
TagCloud/CloudLayouter/PointLayouter/Generators/IPointsGenerator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System.Drawing; | ||
|
||
namespace TagCloud.CloudLayouter.PointLayouter.Generators; | ||
|
||
public interface IPointsGenerator | ||
{ | ||
public IEnumerable<Point> GeneratePoints(Point startPoint); | ||
} |
3 changes: 3 additions & 0 deletions
3
TagCloud/CloudLayouter/PointLayouter/Settings/Generators/FermatSpiralSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace TagCloud.CloudLayouter.PointLayouter.Settings.Generators; | ||
|
||
public record FermatSpiralSettings(double Radius, double AngleOffset); |
6 changes: 6 additions & 0 deletions
6
TagCloud/CloudLayouter/PointLayouter/Settings/PointLayouterSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
using System.Drawing; | ||
using TagCloud.CloudLayouter.PointLayouter.Generators; | ||
|
||
namespace TagCloud.CloudLayouter.PointLayouter.Settings; | ||
|
||
public record PointLayouterSettings(Point Center, IPointsGenerator Generator); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Drawing; | ||
using TagCloud.CloudLayouter; | ||
|
||
namespace TagCloud.ImageGenerator; | ||
|
||
#pragma warning disable CA1416 | ||
public class BitmapGenerator(Size size, FontFamily family, Color background, Color foreground, ICloudLayouter layouter) | ||
{ | ||
public BitmapGenerator(BitmapSettings settings, ICloudLayouter layouter) | ||
: this(settings.Sizes, settings.Font, settings.BackgroundColor, settings.ForegroundColor, layouter) | ||
{} | ||
|
||
public Bitmap GenerateWindowsBitmap(List<WordTag> tags) | ||
{ | ||
var bitmap = new Bitmap(size.Width, size.Height); | ||
using var graphics = Graphics.FromImage(bitmap); | ||
|
||
graphics.Clear(background); | ||
var brush = new SolidBrush(foreground); | ||
|
||
foreach (var tag in tags) | ||
{ | ||
var font = new Font(family, tag.FontSize); | ||
var wordSize = CeilSize(graphics.MeasureString(tag.Word, font)); | ||
|
||
var positionRect = layouter.PutNextRectangle(wordSize); | ||
graphics.DrawString(tag.Word, font, brush, positionRect); | ||
} | ||
|
||
return bitmap; | ||
} | ||
|
||
private static Size CeilSize(SizeF size) | ||
=> new((int)size.Width + 1, (int)size.Height + 1); | ||
} | ||
#pragma warning restore CA1416 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Drawing; | ||
|
||
namespace TagCloud.ImageGenerator; | ||
|
||
public record BitmapSettings( | ||
Size Sizes, | ||
FontFamily Font, | ||
Color BackgroundColor, | ||
Color ForegroundColor); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace TagCloud.ImageGenerator; | ||
|
||
public record WordTag(string Word, int FontSize); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Drawing; | ||
|
||
namespace TagCloud.ImageSaver; | ||
|
||
#pragma warning disable CA1416 | ||
public class BitmapFileSaver(string imageName, string imageFormat) : IImageSaver | ||
{ | ||
private readonly List<string> _supportedFormats = ["png", "jpg", "jpeg", "bmp"]; | ||
|
||
public BitmapFileSaver(FileSaveSettings settings) | ||
: this(settings.ImageName, settings.ImageFormat) | ||
{ } | ||
|
||
public string Save(Bitmap image) | ||
{ | ||
if (!_supportedFormats.Contains(imageFormat)) | ||
throw new ArgumentException($"Unsupported image format: {imageFormat}"); | ||
|
||
var fullImageName = $"{imageName}.{imageFormat}"; | ||
image.Save(fullImageName); | ||
return Path.Combine(Directory.GetCurrentDirectory(), fullImageName); | ||
} | ||
} | ||
#pragma warning restore CA1416 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace TagCloud.ImageSaver; | ||
|
||
public record FileSaveSettings(string ImageName, string ImageFormat); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System.Drawing; | ||
|
||
namespace TagCloud.ImageSaver; | ||
|
||
public interface IImageSaver | ||
{ | ||
public string Save(Bitmap image); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="bin\Debug\net8.0\TagCloud.deps.json" /> | ||
<Content Include="bin\Debug\net8.0\TagCloud.dll" /> | ||
<Content Include="bin\Debug\net8.0\TagCloud.exe" /> | ||
<Content Include="bin\Debug\net8.0\TagCloud.pdb" /> | ||
<Content Include="bin\Debug\net8.0\TagCloud.runtimeconfig.json" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Autofac" Version="8.1.1" /> | ||
<PackageReference Include="CommandLineParser" Version="2.9.1" /> | ||
<PackageReference Include="CsvHelper" Version="33.0.1" /> | ||
<PackageReference Include="DocX" Version="3.0.1" /> | ||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" /> | ||
<PackageReference Include="WeCantSpell.Hunspell" Version="5.2.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="bin\Debug\net8.0\Dictionaries\enUS.aff" /> | ||
<None Include="bin\Debug\net8.0\Dictionaries\enUS.dic" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using WeCantSpell.Hunspell; | ||
|
||
namespace TagCloud.WordsFilter; | ||
|
||
public class BoringWordsFilter : IWordsFilter | ||
{ | ||
private readonly WordList wordList = WordList.CreateFromFiles( | ||
"./Dictionaries/enUS.dic", | ||
"./Dictionaries/enUS.aff"); | ||
|
||
public List<string> ApplyFilter(List<string> words) | ||
=> words.Where(w => !IsBoring(w)).ToList(); | ||
|
||
private WordEntryDetail[] CheckDetails(string word) | ||
{ | ||
var details = wordList.CheckDetails(word); | ||
return wordList[string.IsNullOrEmpty(details.Root) ? word : details.Root]; | ||
} | ||
|
||
private bool IsBoring(string word) | ||
{ | ||
var details = CheckDetails(word); | ||
|
||
if (details.Length != 0 && details[0].Morphs.Count != 0) | ||
{ | ||
var po = details[0].Morphs[0]; | ||
return po is "po:pronoun" or "po:preposition" or "po:determiner" or "po:conjunction"; | ||
} | ||
return false; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
А если мы захотим сделать сохранение на яндекс диск, то какие settings нужно будет передать?
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.
Я к тому, что, возможно, передавать Settings в конструкторе - может стать узким горлышком.
Но сразу скажу, что нет, просто хочу послушать твои мысли)