mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
commit
528164a059
@ -30,7 +30,7 @@ namespace Wabbajack.Common
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (DateTime.Now - startTime > timeout || token.IsCancellationRequested || isDisposed)
|
if (DateTime.Now - startTime > timeout || token.IsCancellationRequested || isDisposed)
|
||||||
return (false, default);
|
return (false, default)!;
|
||||||
await Task.Delay(100);
|
await Task.Delay(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ namespace Wabbajack
|
|||||||
string? reason = null,
|
string? reason = null,
|
||||||
Exception? ex = null)
|
Exception? ex = null)
|
||||||
{
|
{
|
||||||
Value = val;
|
Value = val!;
|
||||||
Succeeded = succeeded;
|
Succeeded = succeeded;
|
||||||
_reason = reason ?? string.Empty;
|
_reason = reason ?? string.Empty;
|
||||||
Exception = ex;
|
Exception = ex;
|
||||||
@ -128,7 +128,7 @@ namespace Wabbajack
|
|||||||
|
|
||||||
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);
|
return new GetResponse<T>(successful, val!, reason);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ namespace Wabbajack
|
|||||||
var prev = prevStorage;
|
var prev = prevStorage;
|
||||||
prevStorage = i;
|
prevStorage = i;
|
||||||
return (prev, i);
|
return (prev, i);
|
||||||
});
|
})!;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IObservable<T> DelayInitial<T>(this IObservable<T> source, TimeSpan delay, IScheduler scheduler)
|
public static IObservable<T> DelayInitial<T>(this IObservable<T> source, TimeSpan delay, IScheduler scheduler)
|
||||||
|
@ -105,7 +105,7 @@ namespace Wabbajack
|
|||||||
{
|
{
|
||||||
return source
|
return source
|
||||||
.ToProperty(vm, property, initialValue, deferSubscription, RxApp.MainThreadScheduler)
|
.ToProperty(vm, property, initialValue, deferSubscription, RxApp.MainThreadScheduler)
|
||||||
.DisposeWith(vm.CompositeDisposable);
|
.DisposeWith(vm.CompositeDisposable)!;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ToGuiProperty<TRet>(
|
public static void ToGuiProperty<TRet>(
|
||||||
@ -116,7 +116,7 @@ namespace Wabbajack
|
|||||||
TRet initialValue = default,
|
TRet initialValue = default,
|
||||||
bool deferSubscription = false)
|
bool deferSubscription = false)
|
||||||
{
|
{
|
||||||
source.ToProperty(vm, property, out result, initialValue, deferSubscription, RxApp.MainThreadScheduler)
|
source.ToProperty(vm, property, out result!, initialValue, deferSubscription, RxApp.MainThreadScheduler)
|
||||||
.DisposeWith(vm.CompositeDisposable);
|
.DisposeWith(vm.CompositeDisposable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user