瀏覽代碼

Include icon in package & fix a couple warnings

Claire Novotny 3 年之前
父節點
當前提交
c243ae1ab5

+ 5 - 1
Ix.NET/Source/Directory.Build.props

@@ -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>
@@ -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>

+ 3 - 4
Ix.NET/Source/Ix.NET.sln

@@ -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
@@ -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
@@ -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

+ 1 - 1
Ix.NET/Source/System.Linq.Async/System/Linq/Maybe.cs

@@ -19,7 +19,7 @@ namespace System.Linq
 
         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);

+ 4 - 4
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleLinkedNode.cs

@@ -58,7 +58,7 @@ namespace System.Linq
         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++;
             }
@@ -86,10 +86,10 @@ namespace System.Linq
         {
             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);
             }
 
@@ -106,7 +106,7 @@ namespace System.Linq
 
             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;

+ 1 - 1
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Observable.cs

@@ -85,7 +85,7 @@ namespace System.Linq
                         {
                             var completed = Volatile.Read(ref _completed);
 
-                            if (_values!.TryDequeue(out _current))
+                            if (_values!.TryDequeue(out _current!))
                             {
                                 return true;
                             }