mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-07 17:12:44 +01:00
Upgrade StyleCop.Analyzers to Unstable 1.2.0.556
This commit is contained in:
parent
cbcefa41ab
commit
cd680a47b5
110 changed files with 297 additions and 292 deletions
|
|
@ -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 @@ public static void Add<TKey, TValue>(this ICollection<KeyValuePair<TKey, TValue>
|
|||
}
|
||||
|
||||
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 @@ private void NotifyThreadPoolOfPendingWork()
|
|||
{
|
||||
_currentThreadIsProcessingItems = false;
|
||||
}
|
||||
}, null);
|
||||
},
|
||||
null);
|
||||
}
|
||||
|
||||
/// <summary>Attempts to execute the specified task on the current thread.</summary>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ public static Task LogExceptions(this Task task)
|
|||
Logger.Error(exception, "Task Error");
|
||||
}
|
||||
}
|
||||
}, TaskContinuationOptions.OnlyOnFaulted);
|
||||
},
|
||||
TaskContinuationOptions.OnlyOnFaulted);
|
||||
|
||||
return task;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,8 @@ public void PublishEvent<TEvent>(TEvent @event)
|
|||
_taskFactory.StartNew(() =>
|
||||
{
|
||||
handlerLocal.HandleAsync(@event);
|
||||
}, TaskCreationOptions.PreferFairness)
|
||||
},
|
||||
TaskCreationOptions.PreferFairness)
|
||||
.LogExceptions();
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +120,8 @@ public void PublishEvent<TEvent>(TEvent @event)
|
|||
_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 @@ private IContainer CreateTestContainer(IContainer container)
|
|||
var mock = (Mock)r.Resolve(mockType);
|
||||
SetMock(serviceType, mock);
|
||||
return mock.Object;
|
||||
}, Reuse.Singleton);
|
||||
},
|
||||
Reuse.Singleton);
|
||||
|
||||
return new[] { new DynamicRegistration(mockFactory, IfAlreadyRegistered.Keep) };
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue