Skip to content

Commit

Permalink
Merge pull request #316 from rianjs/RollUpPrs
Browse files Browse the repository at this point in the history
Roll up prs
  • Loading branch information
rianjs authored Sep 19, 2017
2 parents bf53588 + 70fc332 commit 887adeb
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
9 changes: 2 additions & 7 deletions net-core/Ical.Net/Ical.Net.Collections/GroupedValueList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ public virtual void Set(TGroup group, IEnumerable<TValueType> values)
{
if (ContainsKey(group))
{
var items = AllOf(group);
if (items != null)
{
// Add a value to the first matching item in the list
items.First().SetValue(values);
return;
}
AllOf(group)?.FirstOrDefault()?.SetValue(values);
return;
}

// No matching item was found, add a new item to the list
Expand Down
2 changes: 1 addition & 1 deletion net-core/Ical.Net/Ical.Net.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Ical.Net</id>
<version>3.0.11-net-core-beta</version>
<version>3.0.12</version>
<title>Ical.Net</title>
<authors>Rian Stockbower, Douglas Day, M. David Peterson</authors>
<owners>Rian Stockbower</owners>
Expand Down
2 changes: 2 additions & 0 deletions net-core/Ical.Net/Ical.Net/Components/CalendarEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ public override int GetHashCode()
unchecked
{
var hashCode = DtStart?.GetHashCode() ?? 0;
hashCode = (hashCode * 397) ^ (Summary?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (DtEnd?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (Location?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ Status.GetHashCode();
Expand Down
9 changes: 8 additions & 1 deletion release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
A listing of what each [Nuget package](https://www.nuget.org/packages/Ical.Net) version represents.

### v3

* 3.0.12: Several improvements rolled up:
* `CalendarEvent` now considers Summary and Description for equality and hashing. [PR 309](https://github.com/rianjs/ical.net/pull/309).
* Protection against `InvalidOperationException`s in some collections usage scenarios [PR 312](https://github.com/rianjs/ical.net/pull/312)
* Normalized `Journal` implementation. [PR 310](https://github.com/rianjs/ical.net/pull/310)
* 3.0.11-net-core-beta: Targeting netstandard1.3 and net46
* 3.0.10-net-core-beta: Reverts a change made in 3.0.3 which allowed UTC timestamps to specify `TZID=UTC` instead of being suffixed with `Z`. The spec requires `Z` suffixes, and broke many applications, including Outlook. [#263](https://github.com/rianjs/ical.net/issues/263)
* 3.0.9-net-core-beta: Bugfixes: `PeriodList` now fully implements `IList<Period>`. Keep data structures in sync in GroupedList.Remove() [#253](https://github.com/rianjs/ical.net/issues/253). Fix for StackOverflow exception [#257](https://github.com/rianjs/ical.net/issues/257). UnitTests can now be run in VS test runner!
Expand All @@ -17,6 +20,10 @@ A listing of what each [Nuget package](https://www.nuget.org/packages/Ical.Net)

### v2

* 2.3.3: Several improvements rolled up:
* `Event` now considers Summary and Description for equality and hashing. [PR 309](https://github.com/rianjs/ical.net/pull/309).
* Protection against `InvalidOperationException`s in some collections usage scenarios [PR 312](https://github.com/rianjs/ical.net/pull/312)
* Normalized `Journal` implementation. [PR 310](https://github.com/rianjs/ical.net/pull/310)
* 2.3.2: Reverts a change made in 2.2.34 which allowed UTC timestamps to specify `TZID=UTC` instead of being suffixed with `Z`. The spec requires `Z` suffixes, and broke many applications, including Outlook. [#263](https://github.com/rianjs/ical.net/issues/263)
* 2.3.0: PeriodList now implements `IList` [#280](https://github.com/rianjs/ical.net/issues/280)
* 2.2.39: Bugfix: Better CalDateTime equality and hashing, because time zones matter. [#275](https://github.com/rianjs/ical.net/issues/275)
Expand Down
2 changes: 1 addition & 1 deletion v2/Ical.Net.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Ical.Net</id>
<version>2.3.2</version>
<version>2.3.3</version>
<title>Ical.Net</title>
<authors>Rian Stockbower, Douglas Day, M. David Peterson</authors>
<owners>Rian Stockbower</owners>
Expand Down
9 changes: 2 additions & 7 deletions v2/ical.NET.Collections/GroupedValueList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ public virtual void Set(TGroup group, IEnumerable<TValueType> values)
{
if (ContainsKey(group))
{
// Add a value to the first matching item in the list
var item = AllOf(group).FirstOrDefault();
if (item != null)
{
item.SetValue(values);
return;
}
AllOf(group)?.FirstOrDefault()?.SetValue(values);
return;
}

// No matching item was found, add a new item to the list
Expand Down
4 changes: 4 additions & 0 deletions v2/ical.NET/Components/Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ protected bool Equals(Event other)
resourcesSet.UnionWith(Resources);

var result = Equals(DtStart, other.DtStart)
&& string.Equals(Summary, other.Summary, StringComparison.OrdinalIgnoreCase)
&& string.Equals(Description, other.Description, StringComparison.OrdinalIgnoreCase)
&& Equals(DtEnd, other.DtEnd)
&& string.Equals(Location, other.Location, StringComparison.OrdinalIgnoreCase)
&& resourcesSet.SetEquals(other.Resources)
Expand Down Expand Up @@ -346,6 +348,8 @@ public override int GetHashCode()
unchecked
{
var hashCode = DtStart?.GetHashCode() ?? 0;
hashCode = (hashCode * 397) ^ (Summary?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (DtEnd?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (Location?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ Status.GetHashCode();
Expand Down

0 comments on commit 887adeb

Please sign in to comment.