16 instantiations of StrongBox
System.Collections.Concurrent (2)
System\Collections\Concurrent\PartitionerStatic.cs (2)
419_localOffset = new StrongBox<int>(-1); 420_currentChunkSize = new StrongBox<int>(0);
System.Console (3)
System\Console.cs (3)
263Volatile.Write(ref _isStdInRedirected, new StrongBox<bool>(ConsolePal.IsInputRedirectedCore())); 278Volatile.Write(ref _isStdOutRedirected, new StrongBox<bool>(ConsolePal.IsOutputRedirectedCore())); 293Volatile.Write(ref _isStdErrRedirected, new StrongBox<bool>(ConsolePal.IsErrorRedirectedCore()));
System.Linq.Expressions (6)
System\Linq\Expressions\Compiler\LambdaCompiler.cs (1)
291return Utils.GetStrongBoxValueField(Expression.Constant(new StrongBox<T>()));
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
1679var nullCase = new StrongBox<int>(1);
System\Linq\Expressions\Interpreter\LocalAccess.cs (4)
305frame.Data[_index] = new StrongBox<object>(_defaultValue); 322frame.Data[_index] = new StrongBox<object>(); 338frame.Data[_index] = new StrongBox<object?>(frame.Data[_index]); 439frame.Data[_index] = new StrongBox<object?>(value);
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (1)
163m_lockObjAndDisposed = new StrongBox<bool>();
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
656props.m_cancellationRegistration = new StrongBox<CancellationTokenRegistration>(ctr);
System.Text.Encodings.Web (1)
System\Text\Encodings\Web\TextEncoderSettings.cs (1)
227StrongBox<AllowedBmpCodePointsBitmap> newBitmap = new StrongBox<AllowedBmpCodePointsBitmap>();
System.Threading.Tasks.Dataflow (1)
Base\DataflowBlock.cs (1)
1999var boxedCompleted = new StrongBox<Task>();
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\ParallelRangeManager.cs (1)
109Interlocked.CompareExchange(ref _indexRanges[_nCurrentIndexRange]._nSharedCurrentIndexOffset, new StrongBox<long>(0), null);
36 references to StrongBox
netstandard (1)
netstandard.cs (1)
1576[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.StrongBox<>))]
System.Collections.Concurrent (2)
System\Collections\Concurrent\PartitionerStatic.cs (2)
315protected StrongBox<int>? _currentChunkSize; 318protected StrongBox<int>? _localOffset;
System.Console (9)
System\Console.cs (9)
250private static StrongBox<bool>? _isStdInRedirected; 251private static StrongBox<bool>? _isStdOutRedirected; 252private static StrongBox<bool>? _isStdErrRedirected; 258StrongBox<bool> redirected = Volatile.Read(ref _isStdInRedirected) ?? EnsureInitialized(); 261static StrongBox<bool> EnsureInitialized() 273StrongBox<bool> redirected = Volatile.Read(ref _isStdOutRedirected) ?? EnsureInitialized(); 276static StrongBox<bool> EnsureInitialized() 288StrongBox<bool> redirected = Volatile.Read(ref _isStdErrRedirected) ?? EnsureInitialized(); 291static StrongBox<bool> EnsureInitialized()
System.Core (1)
System.Core.cs (1)
194[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.StrongBox<>))]
System.Linq.Expressions (9)
System\Linq\Expressions\Compiler\CompilerScope.cs (1)
324Type boxType = typeof(StrongBox<>).MakeGenericType(v.Type);
System\Linq\Expressions\Compiler\CompilerScope.Storage.cs (2)
115Type boxType = typeof(StrongBox<>).MakeGenericType(variable.Type); 167Type boxType = typeof(StrongBox<>).MakeGenericType(variable.Type);
System\Linq\Expressions\Compiler\HoistedLocals.cs (1)
91return ((StrongBox<object[]>)locals[0]).Value!;
System\Linq\Expressions\Interpreter\ControlFlowInstructions.cs (2)
762private readonly StrongBox<int> _nullCase; 764internal StringSwitchInstruction(Dictionary<string, int> cases, StrongBox<int> nullCase)
System\Linq\Expressions\Interpreter\InstructionList.cs (1)
1097public void EmitStringSwitch(Dictionary<string, int> cases, StrongBox<int> nullCase)
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
1679var nullCase = new StrongBox<int>(1);
System\Linq\Expressions\Utils.cs (1)
58[DynamicDependency("Value", typeof(StrongBox<>))]
System.Private.CoreLib (6)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\StrongBox.cs (4)
11/// <typeparam name="T">The type of the value that the <see cref = "StrongBox{T}"></see> references.</typeparam> 15/// Gets the strongly typed value associated with the <see cref = "StrongBox{T}"></see> 28/// Initializes a new <see cref = "StrongBox{T}"></see> with the specified value. 30/// <param name="value">A value that the <see cref = "StrongBox{T}"></see> will reference.</param>
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (1)
53private readonly StrongBox<bool> m_lockObjAndDisposed;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
234internal StrongBox<CancellationTokenRegistration>? m_cancellationRegistration; // Task's registration with the cancellation token
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net9.0\System.Runtime.Forwards.cs (1)
611[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.StrongBox<>))]
System.Text.Encodings.Web (1)
System\Text\Encodings\Web\TextEncoderSettings.cs (1)
227StrongBox<AllowedBmpCodePointsBitmap> newBitmap = new StrongBox<AllowedBmpCodePointsBitmap>();
System.Threading.Tasks.Dataflow (4)
Base\DataflowBlock.cs (4)
1999var boxedCompleted = new StrongBox<Task>(); 2081StrongBox<Task> boxedCompleted, CancellationTokenSource cts, 2159private readonly StrongBox<Task> _completed; 2164internal ChooseTarget(StrongBox<Task> completed, CancellationToken cancellationToken)
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\ParallelRangeManager.cs (2)
34internal volatile StrongBox<long>? _nSharedCurrentIndexOffset; 106StrongBox<long>? sharedCurrentIndexOffset = _indexRanges[_nCurrentIndexRange]._nSharedCurrentIndexOffset;