/// <summary>Initializes the awaitable.</summary>
/// <param name="value">The wrapped <see cref="ValueTask"/>.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ConfiguredValueTaskAwaitable(ValueTask value) => _value = value;
+ internal ConfiguredValueTaskAwaitable(in ValueTask value) => _value = value;
/// <summary>Returns an awaiter for this <see cref="ConfiguredValueTaskAwaitable"/> instance.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public ConfiguredValueTaskAwaiter GetAwaiter() => new ConfiguredValueTaskAwaiter(_value);
+ public ConfiguredValueTaskAwaiter GetAwaiter() => new ConfiguredValueTaskAwaiter(in _value);
/// <summary>Provides an awaiter for a <see cref="ConfiguredValueTaskAwaitable"/>.</summary>
[StructLayout(LayoutKind.Auto)]
/// <summary>Initializes the awaiter.</summary>
/// <param name="value">The value to be awaited.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ConfiguredValueTaskAwaiter(ValueTask value) => _value = value;
+ internal ConfiguredValueTaskAwaiter(in ValueTask value) => _value = value;
/// <summary>Gets whether the <see cref="ConfiguredValueTaskAwaitable"/> has completed.</summary>
public bool IsCompleted
/// <summary>Initializes the awaitable.</summary>
/// <param name="value">The wrapped <see cref="ValueTask{TResult}"/>.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ConfiguredValueTaskAwaitable(ValueTask<TResult> value) => _value = value;
+ internal ConfiguredValueTaskAwaitable(in ValueTask<TResult> value) => _value = value;
/// <summary>Returns an awaiter for this <see cref="ConfiguredValueTaskAwaitable{TResult}"/> instance.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public ConfiguredValueTaskAwaiter GetAwaiter() => new ConfiguredValueTaskAwaiter(_value);
+ public ConfiguredValueTaskAwaiter GetAwaiter() => new ConfiguredValueTaskAwaiter(in _value);
/// <summary>Provides an awaiter for a <see cref="ConfiguredValueTaskAwaitable{TResult}"/>.</summary>
[StructLayout(LayoutKind.Auto)]
/// <summary>Initializes the awaiter.</summary>
/// <param name="value">The value to be awaited.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ConfiguredValueTaskAwaiter(ValueTask<TResult> value) => _value = value;
+ internal ConfiguredValueTaskAwaiter(in ValueTask<TResult> value) => _value = value;
/// <summary>Gets whether the <see cref="ConfiguredValueTaskAwaitable{TResult}"/> has completed.</summary>
public bool IsCompleted
/// <summary>Initializes the awaiter.</summary>
/// <param name="value">The value to be awaited.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ValueTaskAwaiter(ValueTask value) => _value = value;
+ internal ValueTaskAwaiter(in ValueTask value) => _value = value;
/// <summary>Gets whether the <see cref="ValueTask"/> has completed.</summary>
public bool IsCompleted
/// <summary>Initializes the awaiter.</summary>
/// <param name="value">The value to be awaited.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ValueTaskAwaiter(ValueTask<TResult> value) => _value = value;
+ internal ValueTaskAwaiter(in ValueTask<TResult> value) => _value = value;
/// <summary>Gets whether the <see cref="ValueTask{TResult}"/> has completed.</summary>
public bool IsCompleted
}
/// <summary>Gets an awaiter for this <see cref="ValueTask"/>.</summary>
- public ValueTaskAwaiter GetAwaiter() => new ValueTaskAwaiter(this);
+ public ValueTaskAwaiter GetAwaiter() => new ValueTaskAwaiter(in this);
/// <summary>Configures an awaiter for this <see cref="ValueTask"/>.</summary>
/// <param name="continueOnCapturedContext">
/// <summary>Gets an awaiter for this <see cref="ValueTask{TResult}"/>.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public ValueTaskAwaiter<TResult> GetAwaiter() => new ValueTaskAwaiter<TResult>(this);
+ public ValueTaskAwaiter<TResult> GetAwaiter() => new ValueTaskAwaiter<TResult>(in this);
/// <summary>Configures an awaiter for this <see cref="ValueTask{TResult}"/>.</summary>
/// <param name="continueOnCapturedContext">