Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Ical.Net.Tests/Ical.Net.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<AssemblyOriginatorKeyFile>..\IcalNetStrongnameKey.snk</AssemblyOriginatorKeyFile>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<!-- netstandard2.0 does not support NRT -->
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8618;CS8620;CS8714</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NUnit" Version="4.2.2" />
Expand Down
5 changes: 3 additions & 2 deletions Ical.Net/DataTypes/Organizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public Organizer(string value) : this()
}

var serializer = new OrganizerSerializer();
CopyFrom(serializer.Deserialize(new StringReader(value)) as ICopyable);
if (serializer.Deserialize(new StringReader(value)) is ICopyable deserialized)
CopyFrom(deserialized);
}

protected bool Equals(Organizer other) => Equals(Value, other.Value);
Expand All @@ -109,7 +110,7 @@ public override bool Equals(object? obj)
public override int GetHashCode() => Value?.GetHashCode() ?? 0;

/// <inheritdoc/>
public override void CopyFrom(ICopyable obj)
public sealed override void CopyFrom(ICopyable obj)
{
base.CopyFrom(obj);

Expand Down
4 changes: 4 additions & 0 deletions Ical.Net/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<PackageIcon>assets/icon.png</PackageIcon>
<PackageReadmeFile>assets/readme.md</PackageReadmeFile>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<!-- netstandard2.0 does not support NRT -->
<NoWarn>$(NoWarn);CS8600;CS8601;CS8602;CS8603;CS8604;CS8618;CS8620;CS8714</NoWarn>
</PropertyGroup>
<ItemGroup>
<None Include="..\readme.md">
<Pack>true</Pack>
Expand Down
Loading