readonly readonly structs (#1908)

This commit is contained in:
Ben Adams 2018-04-09 07:28:37 +01:00 committed by David Fowler
parent bd78785f8d
commit 406d8f9a81
4 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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; }

View File

@ -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()
{ {

View File

@ -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;