Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Feb 12, 2025
1 parent 57c4731 commit d9732af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions DSTV.Net/Data/Contour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ private Contour(List<DstvContourPoint> pointList, ContourType type)
public static IEnumerable<Contour> CreateSeveralContours(List<DstvContourPoint> pointList, ContourType type)
{
#if NET
ArgumentNullException.ThrowIfNull(pointList, nameof(pointList));
ArgumentNullException.ThrowIfNull(pointList);
#else
if (pointList is null) throw new ArgumentNullException(nameof(pointList));
#endif

List<Contour> outList = new();
List<Contour> outList = [];
if (type is ContourType.AK or ContourType.IK)
{
outList.Add(new Contour(pointList, type));
Expand Down Expand Up @@ -85,7 +85,7 @@ public override string ToSvg()
{
var sb = new StringBuilder();
var sbLine = new StringBuilder();
var previous = new DstvContourPoint("x", 0, 0, false, 0);
var previous = new DstvContourPoint("x", 0, 0, IsNotch: false, 0);
foreach (var point in _pointList)
{
if (_pointList.IndexOf(point) == 0)
Expand Down Expand Up @@ -132,7 +132,7 @@ public override string ToSvg()
.Append(screwingPoint.YCoord).Append("\" x2=\"").Append(point.XCoord).Append("\" y2=\"")
.Append(point.YCoord).Append("\" stroke=\"red\" stroke-width=\"4\" />");
}

previous = point;
}

Expand Down
4 changes: 2 additions & 2 deletions DSTV.Net/Data/DstvElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public record DstvElement
protected static string[] GetDataVector(string dstvElementLine, ISplitter splitter)
{
#if NET
ArgumentNullException.ThrowIfNull(splitter, nameof(splitter));
ArgumentNullException.ThrowIfNull(splitter);
#else
if (splitter is null) throw new ArgumentNullException(nameof(splitter));
#endif
Expand All @@ -29,7 +29,7 @@ protected static string[] GetDataVector(string dstvElementLine, ISplitter splitt
protected static string[] CorrectSplits(string[] separated, bool skipFirst = false, bool skipLast = false)
{
#if NET
ArgumentNullException.ThrowIfNull(separated, nameof(separated));
ArgumentNullException.ThrowIfNull(separated);
#else
if (separated is null) throw new ArgumentNullException(nameof(separated));
#endif
Expand Down
4 changes: 2 additions & 2 deletions DSTV.Net/Implementations/DstvReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public async Task<IDstv> ParseAsync(string dstvData)
public async Task<IDstv> ParseAsync(TextReader reader)
{
#if NET
ArgumentNullException.ThrowIfNull(reader, nameof(reader));
ArgumentNullException.ThrowIfNull(reader);
#else
if (reader == null) throw new ArgumentNullException(nameof(reader));
#endif
Expand All @@ -33,7 +33,7 @@ public async Task<IDstv> ParseAsync(TextReader reader)
return new DstvRecord
{
Header = await HeaderReader.ParseAsync(context).ConfigureAwait(false),
Elements = await BodyReader.GetElementsAsync(context).ConfigureAwait(false)
Elements = await BodyReader.GetElementsAsync(context).ConfigureAwait(false),
};
}
}

0 comments on commit d9732af

Please sign in to comment.