Skip to content
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

Include icon in package & fix a couple warnings #1701

Merged
merged 1 commit into from
Feb 1, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion Ix.NET/Source/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<MinClientVersion>2.12</MinClientVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Authors>.NET Foundation and Contributors</Authors>
<PackageIconUrl>https://raw.githubusercontent.com/dotnet/reactive/0f837d11385cfaf575861ccc5a5fbcafb22d888f/Rx.NET/Resources/Artwork/Logo.png</PackageIconUrl>
<PackageIcon>Logo.png</PackageIcon>
<PackageProjectUrl>https://github.com/dotnet/reactive</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand All @@ -29,6 +29,10 @@
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.255" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)..\..\Rx.NET\Resources\Artwork\Logo.png" Pack="true" PackagePath="\" Visible="false" />
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="coverlet.collector" Version="3.1.1" />
</ItemGroup>
Expand Down
7 changes: 3 additions & 4 deletions Ix.NET/Source/Ix.NET.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28606.126
# Visual Studio Version 17
VisualStudioVersion = 17.2.32131.331
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{87534290-A7A6-47A4-9A3A-D0D21A9AD1D4}"
EndProject
Expand All @@ -13,7 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.build.props = Directory.build.props
Directory.build.targets = Directory.build.targets
global.json = global.json
NuGet.Config = NuGet.Config
version.json = version.json
EndProjectSection
EndProject
Expand Down Expand Up @@ -62,7 +61,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks.System.Interacti
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Linq.Async.Ref", "refs\System.Linq.Async.Ref\System.Linq.Async.Ref.csproj", "{1754B36C-D0DB-4E5D-8C30-1F116046DC0F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Linq.Async.SourceGenerator", "System.Linq.Async.SourceGenerator\System.Linq.Async.SourceGenerator.csproj", "{5C26D649-5ED4-49EE-AFBD-8FA8F12C4AE4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Linq.Async.SourceGenerator", "System.Linq.Async.SourceGenerator\System.Linq.Async.SourceGenerator.csproj", "{5C26D649-5ED4-49EE-AFBD-8FA8F12C4AE4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion Ix.NET/Source/System.Linq.Async/System/Linq/Maybe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Maybe(T value)

public bool Equals(Maybe<T> other) => HasValue == other.HasValue && EqualityComparer<T>.Default.Equals(Value, other.Value);
public override bool Equals(object? other) => other is Maybe<T> m && Equals(m);
public override int GetHashCode() => HasValue ? EqualityComparer<T>.Default.GetHashCode(Value) : 0;
public override int GetHashCode() => HasValue ? EqualityComparer<T>.Default.GetHashCode(Value!) : 0;

public static bool operator ==(Maybe<T> first, Maybe<T> second) => first.Equals(second);
public static bool operator !=(Maybe<T> first, Maybe<T> second) => !first.Equals(second);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private SingleLinkedNode(SingleLinkedNode<TSource> linked, TSource item)
public int GetCount()
{
var count = 0;
for (SingleLinkedNode<TSource>? node = this; node != null; node = node.Linked)
for (var node = this; node != null; node = node.Linked)
{
count++;
}
Expand Down Expand Up @@ -86,10 +86,10 @@ public SingleLinkedNode<TSource> GetNode(int index)
{
Debug.Assert(index >= 0 && index < GetCount());

SingleLinkedNode<TSource> node = this;
var node = this;
for (; index > 0; index--)
{
node = node.Linked!;
node = node!.Linked!;
Debug.Assert(node != null);
}

Expand All @@ -106,7 +106,7 @@ private TSource[] ToArray(int count)

var array = new TSource[count];
var index = count;
for (SingleLinkedNode<TSource>? node = this; node != null; node = node.Linked)
for (var node = this; node != null; node = node.Linked)
{
--index;
array[index] = node.Item;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected override async ValueTask<bool> MoveNextCore()
{
var completed = Volatile.Read(ref _completed);

if (_values!.TryDequeue(out _current))
if (_values!.TryDequeue(out _current!))
{
return true;
}
Expand Down