12 instantiations of BufferScope
Microsoft.Build.Framework (12)
Collections\RefArrayBuilder.cs (3)
32_scope = new BufferScope<T>(initialCapacity); 44_scope = new BufferScope<T>(scratchBuffer); 313var newScope = new BufferScope<T>(nextCapacity);
Coordinator\CoordinatorSettings.cs (2)
153? new(stackalloc byte[byteCount]) 154: new(byteCount);
Globbing\GlobPattern.cs (2)
29using BufferScope<char> buffer = new(stackalloc char[256], checked(fixedDirectory.Length + wildcardDirectory.Length + filename.Length)); 102using BufferScope<Backtrack> backtracks = new(stackalloc Backtrack[16]);
Globbing\MSBuildPathMatcher.cs (1)
408using BufferScope<byte> stateBuffer = new(stackalloc byte[StackStateCount * 2], checked(stateCount * 2));
Utilities\FileMatcher.cs (1)
2763using BufferScope<byte> activeExcludes = new(stackalloc byte[8], excludeCount);
Utilities\ProcessExtensions.cs (3)
171using BufferScope<char> charBuffer = new(data.Length); 555using BufferScope<byte> buffer = new((int)size); 622using BufferScope<byte> buffer = new((int)size);
19 references to BufferScope
Microsoft.Build.Framework (19)
Collections\RefArrayBuilder.cs (2)
23private BufferScope<T> _scope; 313var newScope = new BufferScope<T>(nextCapacity);
Coordinator\CoordinatorSettings.cs (1)
152using BufferScope<byte> pipeNameBytes = byteCount <= 256
Globbing\GlobPattern.cs (2)
29using BufferScope<char> buffer = new(stackalloc char[256], checked(fixedDirectory.Length + wildcardDirectory.Length + filename.Length)); 102using BufferScope<Backtrack> backtracks = new(stackalloc Backtrack[16]);
Globbing\MSBuildPathMatcher.cs (1)
408using BufferScope<byte> stateBuffer = new(stackalloc byte[StackStateCount * 2], checked(stateCount * 2));
Utilities\BufferScope.cs (8)
32/// Initializes a new instance of the <see cref="BufferScope{T}"/>. 42/// Create the <see cref="BufferScope{T}"/> with an initial buffer. Useful for creating with an initial stack 53/// Create the <see cref="BufferScope{T}"/> with an initial buffer. Useful for creating with an initial stack 89/// Consider if creating new <see cref="BufferScope{T}"/> instances is possible and cleaner than using 162/// Implicitly converts a <see cref="BufferScope{T}"/> to a <see cref="Span{T}"/>. 166public static implicit operator Span<T>(BufferScope<T> scope) 170/// Implicitly converts a <see cref="BufferScope{T}"/> to a <see cref="ReadOnlySpan{T}"/>. 174public static implicit operator ReadOnlySpan<T>(BufferScope<T> scope)
Utilities\FileMatcher.cs (1)
2763using BufferScope<byte> activeExcludes = new(stackalloc byte[8], excludeCount);
Utilities\PooledBuffer.cs (1)
24/// For short-lived buffers that can start on the stack or need to grow, use <see cref="BufferScope{T}"/>.
Utilities\ProcessExtensions.cs (3)
171using BufferScope<char> charBuffer = new(data.Length); 555using BufferScope<byte> buffer = new((int)size); 622using BufferScope<byte> buffer = new((int)size);