readonly readonly structs (#1908)
This commit is contained in:
parent
bd78785f8d
commit
406d8f9a81
|
|
@ -26,7 +26,7 @@ namespace System.Threading.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal struct ForceAsyncAwaiter : ICriticalNotifyCompletion
|
internal readonly struct ForceAsyncAwaiter : ICriticalNotifyCompletion
|
||||||
{
|
{
|
||||||
private readonly Task _task;
|
private readonly Task _task;
|
||||||
|
|
||||||
|
|
@ -50,7 +50,7 @@ namespace System.Threading.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal struct ForceAsyncAwaiter<T> : ICriticalNotifyCompletion
|
internal readonly struct ForceAsyncAwaiter<T> : ICriticalNotifyCompletion
|
||||||
{
|
{
|
||||||
private readonly Task<T> _task;
|
private readonly Task<T> _task;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace System.Threading.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal struct NoThrowAwaiter : ICriticalNotifyCompletion
|
internal readonly struct NoThrowAwaiter : ICriticalNotifyCompletion
|
||||||
{
|
{
|
||||||
private readonly Task _task;
|
private readonly Task _task;
|
||||||
public NoThrowAwaiter(Task task) { _task = task; }
|
public NoThrowAwaiter(Task task) { _task = task; }
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal
|
||||||
return new Awaitable();
|
return new Awaitable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct Awaitable : ICriticalNotifyCompletion
|
public readonly struct Awaitable : ICriticalNotifyCompletion
|
||||||
{
|
{
|
||||||
public void GetResult()
|
public void GetResult()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -807,7 +807,7 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private struct InvocationHandler
|
private readonly struct InvocationHandler
|
||||||
{
|
{
|
||||||
public Type[] ParameterTypes { get; }
|
public Type[] ParameterTypes { get; }
|
||||||
private readonly Func<object[], object, Task> _callback;
|
private readonly Func<object[], object, Task> _callback;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue