Skip to content

Commit 7bf9c3b

Browse files
committed
Remove xmldoc for non-existing parameter "kind"
Also refactor for SonarCloud complaints
1 parent 712c392 commit 7bf9c3b

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

Ical.Net/CalendarComponents/UniqueComponent.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ private void EnsureProperties()
4545
// See https://sourceforge.net/projects/dday-ical/forums/forum/656447/topic/3754354
4646
if (DtStamp == null)
4747
{
48-
// icalendar RFC doesn't care about sub-second time resolution, so shave off everything smaller than seconds.
49-
var utcNow = DateTime.UtcNow.Truncate(TimeSpan.FromSeconds(1));
5048
DtStamp = CalDateTime.UtcNow;
5149
}
5250
}

Ical.Net/DataTypes/CalDateTime.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public CalDateTime(int year, int month, int day, string? tzId = null)
137137
/// <summary>
138138
/// Creates a new instance of the <see cref="CalDateTime"/> class using the specified timezone.
139139
/// </summary>
140-
/// <param name="kind">If <see langword="null"/>, <see cref="DateTimeKind.Unspecified"/> is used.</param>
141140
/// <param name="tzId">The specified value will determine the <see cref="DateTime.Kind"/> property.
142141
/// If the timezone specified is UTC, the underlying <see cref="DateTime.Kind"/> will be
143142
/// <see cref="DateTimeKind.Utc"/>. If a non-UTC timezone or no timezone is specified, the underlying
@@ -400,6 +399,7 @@ public string? TzId
400399
return;
401400
}
402401

402+
_tzId = value;
403403
Initialize(_dateOnly, HasTime ? _timeOnly : null, value);
404404
}
405405
}
@@ -694,7 +694,7 @@ public string ToString(string? format, IFormatProvider? formatProvider)
694694
return $"{dateTimeOffset.TimeOfDay.ToString(format, formatProvider)} {_tzId}";
695695
}
696696

697-
if (HasTime && HasDate)
697+
if (HasTime)
698698
{
699699
return $"{dateTimeOffset.ToString(format, formatProvider)} {_tzId}";
700700
}

Ical.Net/Evaluation/RecurrencePatternEvaluator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Ical.Net.Evaluation;
1414

1515
public class RecurrencePatternEvaluator : Evaluator
1616
{
17-
private const int _maxIncrementCount = 1000;
17+
private const int MaxIncrementCount = 1000;
1818

1919
protected RecurrencePattern Pattern { get; set; }
2020

@@ -284,7 +284,7 @@ private HashSet<DateTime> GetDates(IDateTime seed, DateTime periodStart, DateTim
284284
else
285285
{
286286
noCandidateIncrementCount++;
287-
if (_maxIncrementCount > 0 && noCandidateIncrementCount > _maxIncrementCount)
287+
if (noCandidateIncrementCount > MaxIncrementCount)
288288
{
289289
break;
290290
}

0 commit comments

Comments
 (0)