Upgrade StyleCop.Analyzers to Unstable 1.2.0.556

This commit is contained in:
Bogdan
2025-06-06 13:18:01 +03:00
parent 8eec321a0e
commit bdc3b63df2
110 changed files with 297 additions and 292 deletions
+2 -2
View File
@@ -141,9 +141,9 @@
<!-- Set up stylecop -->
<ItemGroup Condition="'$(ProwlarrProject)'=='true' and '$(EnableAnalyzers)'!='false'">
<!-- StyleCop analysis -->
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<AdditionalFiles Include="$(SolutionDir)stylecop.json" />
</ItemGroup>
@@ -31,7 +31,7 @@ namespace NzbDrone.Common.Extensions
}
public static IDictionary<TNewKey, TNewValue> SelectDictionary<TKey, TValue, TNewKey, TNewValue>(this IDictionary<TKey, TValue> dictionary,
Func<KeyValuePair<TKey, TValue>, ValueTuple<TNewKey, TNewValue>> selection)
Func<KeyValuePair<TKey, TValue>, (TNewKey Item1, TNewValue Item2)> selection)
{
return dictionary.Select(selection).ToDictionary(t => t.Item1, t => t.Item2);
}
@@ -94,7 +94,8 @@ namespace NzbDrone.Common.TPL
{
_currentThreadIsProcessingItems = false;
}
}, null);
},
null);
}
/// <summary>Attempts to execute the specified task on the current thread.</summary>
+2 -1
View File
@@ -20,7 +20,8 @@ namespace NzbDrone.Common.TPL
Logger.Error(exception, "Task Error");
}
}
}, TaskContinuationOptions.OnlyOnFaulted);
},
TaskContinuationOptions.OnlyOnFaulted);
return task;
}
@@ -106,7 +106,8 @@ namespace NzbDrone.Core.Messaging.Events
_taskFactory.StartNew(() =>
{
handlerLocal.HandleAsync(@event);
}, TaskCreationOptions.PreferFairness)
},
TaskCreationOptions.PreferFairness)
.LogExceptions();
}
@@ -119,7 +120,8 @@ namespace NzbDrone.Core.Messaging.Events
_logger.Trace("{0} ~> {1}", eventName, handlerLocal.GetType().Name);
handlerLocal.HandleAsync(@event);
_logger.Trace("{0} <~ {1}", eventName, handlerLocal.GetType().Name);
}, TaskCreationOptions.PreferFairness)
},
TaskCreationOptions.PreferFairness)
.LogExceptions();
}
}
@@ -112,7 +112,8 @@ namespace NzbDrone.Test.Common.AutoMoq
var mock = (Mock)r.Resolve(mockType);
SetMock(serviceType, mock);
return mock.Object;
}, Reuse.Singleton);
},
Reuse.Singleton);
return new[] { new DynamicRegistration(mockFactory, IfAlreadyRegistered.Keep) };
}