mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-19 22:04:56 -04:00
Upgrade StyleCop.Analyzers to Unstable 1.2.0.556
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user