mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
New null errors
This commit is contained in:
parent
84342cf604
commit
263798b7a4
@ -24,7 +24,7 @@ namespace Wabbajack.Common
|
||||
var startTime = DateTime.Now;
|
||||
while (true)
|
||||
{
|
||||
if (_collection.TryPop(out T result))
|
||||
if (_collection.TryPop(out var result))
|
||||
{
|
||||
return (true, result);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace Wabbajack
|
||||
|
||||
private GetResponse(
|
||||
bool succeeded,
|
||||
T val = default,
|
||||
T? val = default,
|
||||
string? reason = null,
|
||||
Exception? ex = null)
|
||||
{
|
||||
@ -126,7 +126,7 @@ namespace Wabbajack
|
||||
return new GetResponse<T>(false, val);
|
||||
}
|
||||
|
||||
public static GetResponse<T> Create(bool successful, T val = default(T), string? reason = null)
|
||||
public static GetResponse<T> Create(bool successful, T? val = default(T), string? reason = null)
|
||||
{
|
||||
return new GetResponse<T>(successful, val!, reason);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ namespace Wabbajack
|
||||
{
|
||||
var hasValue = false;
|
||||
bool throttling = false;
|
||||
T value = default;
|
||||
T? value = default;
|
||||
|
||||
var dueTimeDisposable = new SerialDisposable();
|
||||
|
||||
@ -198,7 +198,7 @@ namespace Wabbajack
|
||||
|
||||
public static IObservable<(T Previous, T Current)> Pairwise<T>(this IObservable<T> source)
|
||||
{
|
||||
T prevStorage = default;
|
||||
T? prevStorage = default;
|
||||
return source.Select(i =>
|
||||
{
|
||||
var prev = prevStorage;
|
||||
|
@ -168,7 +168,7 @@ namespace Wabbajack.BuildServer.Test
|
||||
_authedClient = new Wabbajack.Lib.Http.Client();
|
||||
Fixture = fixture.Deref();
|
||||
var cache = Fixture.GetService<MetricsKeyCache>();
|
||||
cache.AddKey(Metrics.GetMetricsKey().Result);
|
||||
cache.AddKey(Metrics.GetMetricsKey().Result).Wait();
|
||||
_authedClient.Headers.Add(("x-api-key", Fixture.APIKey));
|
||||
AuthorAPI.ApiKeyOverride = Fixture.APIKey;
|
||||
_queue = new WorkQueue();
|
||||
|
Loading…
Reference in New Issue
Block a user