89 references to CollectionsMarshal
Aspire.Dashboard (10)
Components\Pages\TraceDetail.razor.cs (1)
258ref var trace = ref CollectionsMarshal.GetValueRefOrAddDefault(traceCache, traceId, out _);
Otlp\Model\OtlpApplication.cs (2)
63ref var instrumentRef = ref CollectionsMarshal.GetValueRefOrAddDefault(_instruments, instrumentKey, out _); 195ref var meter = ref CollectionsMarshal.GetValueRefOrAddDefault(_meters, scope.Name, out _);
Otlp\Model\OtlpInstrument.cs (1)
71ref var values = ref CollectionsMarshal.GetValueRefOrAddDefault(KnownAttributeValues, key, out _);
Otlp\Storage\TelemetryRepository.cs (5)
298ref var scopeRef = ref CollectionsMarshal.GetValueRefOrAddDefault(scopes, name, out _); 356ref var count = ref CollectionsMarshal.GetValueRefOrAddDefault(_applicationUnviewedErrorLogs, applicationView.ApplicationKey, out _); 696ref var count = ref CollectionsMarshal.GetValueRefOrAddDefault(attributesValues, value, out _); 724ref var count = ref CollectionsMarshal.GetValueRefOrAddDefault(attributesValues, value, out _); 1191ref var values = ref CollectionsMarshal.GetValueRefOrAddDefault(allKnownAttributes, knownAttributeValues.Key, out _);
src\Shared\CircularBuffer.cs (1)
96var data = CollectionsMarshal.AsSpan(_buffer);
Aspire.Hosting (1)
src\Shared\CircularBuffer.cs (1)
96var data = CollectionsMarshal.AsSpan(_buffer);
Microsoft.AspNetCore.Components (2)
Reflection\MemberAssignment.cs (1)
74foreach (var other in CollectionsMarshal.AsSpan(many))
Routing\QueryParameterValueSupplier.cs (1)
25ref var values = ref CollectionsMarshal.GetValueRefOrAddDefault(_queryParameterValuesByName, decodedName, out _);
Microsoft.AspNetCore.Components.Forms (1)
EditContextDataAnnotationsExtensions.cs (1)
100foreach (var result in CollectionsMarshal.AsSpan(results))
Microsoft.AspNetCore.CookiePolicy (1)
ResponseCookiesWrapper.cs (1)
159Cookies.Append(CollectionsMarshal.AsSpan(nonSuppressedValues), options);
Microsoft.AspNetCore.Http.Extensions (1)
src\Shared\PropertyAsParameterInfo.cs (1)
137return flattenedParameters is not null ? CollectionsMarshal.AsSpan(flattenedParameters) : parameters.AsSpan();
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
src\Shared\PropertyAsParameterInfo.cs (1)
137return flattenedParameters is not null ? CollectionsMarshal.AsSpan(flattenedParameters) : parameters.AsSpan();
Microsoft.AspNetCore.OpenApi (1)
src\Shared\PropertyAsParameterInfo.cs (1)
137return flattenedParameters is not null ? CollectionsMarshal.AsSpan(flattenedParameters) : parameters.AsSpan();
Microsoft.AspNetCore.Razor.Runtime (1)
Runtime\TagHelpers\TagHelperRunner.cs (1)
26var tagHelpers = CollectionsMarshal.AsSpan(executionContext.TagHelperList);
Microsoft.AspNetCore.Routing (1)
Matching\HttpMethodMatcherPolicy.cs (1)
398var methods = CollectionsMarshal.AsSpan(httpMethods);
Microsoft.CodeAnalysis (1)
src\Dependencies\Collections\SegmentedDictionary`2.cs (1)
200span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Dependencies\Collections\SegmentedDictionary`2.cs (1)
200span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable);
PresentationFramework (3)
Microsoft\Win32\FileDialog.cs (1)
742return CollectionsMarshal.AsSpan(extensions);
MS\Internal\Globalization\BamlResourceContent.cs (1)
255return CollectionsMarshal.AsSpan(tokens);
MS\Internal\Ink\LassoSelectionBehavior.cs (1)
448return CollectionsMarshal.AsSpan(pointArray);
System.Linq (25)
System\Linq\AggregateBy.cs (2)
126ref TAccumulate? acc = ref CollectionsMarshal.GetValueRefOrAddDefault(dict, key, out bool exists); 158ref TAccumulate? acc = ref CollectionsMarshal.GetValueRefOrAddDefault(dict, key, out bool exists);
System\Linq\CountBy.cs (1)
63ref int currentCount = ref CollectionsMarshal.GetValueRefOrAddDefault(countsBy, key, out _);
System\Linq\Enumerable.cs (3)
38CollectionsMarshal.SetCount(list, count); 39return CollectionsMarshal.AsSpan(list); 60span = CollectionsMarshal.AsSpan(Unsafe.As<List<TSource>>(source));
System\Linq\OrderedEnumerable.SpeedOpt.cs (1)
373Sort(CollectionsMarshal.AsSpan(list), _descending);
System\Linq\SegmentedArrayBuilder.cs (2)
265CollectionsMarshal.SetCount(result, count); 266ToSpanInlined(CollectionsMarshal.AsSpan(result));
System\Linq\Select.SpeedOpt.cs (2)
367ReadOnlySpan<TSource> source = CollectionsMarshal.AsSpan(_source); 381ReadOnlySpan<TSource> source = CollectionsMarshal.AsSpan(_source);
System\Linq\ToCollection.cs (2)
165ReadOnlySpan<TSource> span = CollectionsMarshal.AsSpan(list); 223ReadOnlySpan<TSource> span = CollectionsMarshal.AsSpan(list);
System\Linq\Where.SpeedOpt.cs (12)
286public override int GetCount(bool onlyIfCheap) => ArrayWhereIterator<TSource>.GetCount(onlyIfCheap, CollectionsMarshal.AsSpan(_source), _predicate); 288public override TSource[] ToArray() => ArrayWhereIterator<TSource>.ToArray(CollectionsMarshal.AsSpan(_source), _predicate); 290public override List<TSource> ToList() => ArrayWhereIterator<TSource>.ToList(CollectionsMarshal.AsSpan(_source), _predicate); 296foreach (TSource item in CollectionsMarshal.AsSpan(_source)) 311ReadOnlySpan<TSource> source = CollectionsMarshal.AsSpan(_source); 333foreach (TSource item in CollectionsMarshal.AsSpan(_source)) 488public override int GetCount(bool onlyIfCheap) => ArrayWhereSelectIterator<TSource, TResult>.GetCount(onlyIfCheap, CollectionsMarshal.AsSpan(_source), _predicate, _selector); 490public override TResult[] ToArray() => ArrayWhereSelectIterator<TSource, TResult>.ToArray(CollectionsMarshal.AsSpan(_source), _predicate, _selector); 492public override List<TResult> ToList() => ArrayWhereSelectIterator<TSource, TResult>.ToList(CollectionsMarshal.AsSpan(_source), _predicate, _selector); 494public override TResult? TryGetElementAt(int index, out bool found) => ArrayWhereSelectIterator<TSource, TResult>.TryGetElementAt(CollectionsMarshal.AsSpan(_source), _predicate, _selector, index, out found); 496public override TResult? TryGetFirst(out bool found) => ArrayWhereSelectIterator<TSource, TResult>.TryGetFirst(CollectionsMarshal.AsSpan(_source), _predicate, _selector, out found); 498public override TResult? TryGetLast(out bool found) => ArrayWhereSelectIterator<TSource, TResult>.TryGetLast(CollectionsMarshal.AsSpan(_source), _predicate, _selector, out found);
System.Linq.AsyncEnumerable (4)
System\Linq\AggregateBy.cs (2)
71ref TAccumulate? acc = ref CollectionsMarshal.GetValueRefOrAddDefault(dict, key, out bool exists); 217ref TAccumulate? acc = ref CollectionsMarshal.GetValueRefOrAddDefault(dict, key, out bool exists);
System\Linq\CountBy.cs (2)
48ref int currentCount = ref CollectionsMarshal.GetValueRefOrAddDefault(countsBy, key, out _); 103ref int currentCount = ref CollectionsMarshal.GetValueRefOrAddDefault(countsBy, key, out _);
System.Net.Http (4)
System\Net\Http\Headers\HttpHeaders.cs (4)
354: ref CollectionsMarshal.GetValueRefOrNullRef((Dictionary<HeaderDescriptor, object>)_headerStore, entry.Key); 1430valueRef = ref CollectionsMarshal.GetValueRefOrNullRef(Unsafe.As<Dictionary<HeaderDescriptor, object>>(store), key); 1500return ref CollectionsMarshal.GetValueRefOrAddDefault(dictionary, key, out _); 1506ref object? value = ref CollectionsMarshal.GetValueRefOrAddDefault(dictionary, key, out _);
System.Private.CoreLib (13)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (4)
164span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable); 958/// <inheritdoc cref="CollectionsMarshal.GetValueRefOrAddDefault{TKey, TValue}(Dictionary{TKey, TValue}, TKey, out bool)"/> 1063/// A helper class containing APIs exposed through <see cref="CollectionsMarshal"/> or <see cref="CollectionExtensions"/>. 1069/// <inheritdoc cref="CollectionsMarshal.GetValueRefOrAddDefault{TKey, TValue}(Dictionary{TKey, TValue}, TKey, out bool)"/>
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (2)
789return JoinCore(separator.AsSpan(), CollectionsMarshal.AsSpan(valuesList)); 927return JoinCore(separator, CollectionsMarshal.AsSpan(Unsafe.As<List<string?>>(values)));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (5)
3511Span<object?> continuations = CollectionsMarshal.AsSpan(list); 4944tasks is List<Task> list ? CollectionsMarshal.AsSpan(list) : 4946CollectionsMarshal.AsSpan(new List<Task>(tasks)); 5950return WhenAll(CollectionsMarshal.AsSpan(taskList)); 6729return WhenAnyCore((ReadOnlySpan<TTask>)CollectionsMarshal.AsSpan(Unsafe.As<List<TTask>>(tasks)));
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (2)
162CollectionsMarshal.AsSpan(_genericArguments)); 429ReadOnlySpan<TypeName> GetGenericArguments() => CollectionsMarshal.AsSpan(_genericArguments);
System.Private.Windows.Core (1)
System\IO\BinaryReaderExtensions.cs (1)
242span = CollectionsMarshal.AsSpan(list);
System.Reflection.Metadata (1)
System\Reflection\Metadata\Ecma335\BlobDictionary.cs (1)
30ref var entry = ref CollectionsMarshal.GetValueRefOrAddDefault(_dictionary, dictionaryKey, out exists);
System.Runtime.InteropServices (1)
artifacts\obj\System.Runtime.InteropServices\Debug\net10.0\System.Runtime.InteropServices.Forwards.cs (1)
17[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.CollectionsMarshal))]
System.Text.Json (4)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
59Span<T> span = CollectionsMarshal.AsSpan(items);
System\Text\Json\Document\JsonElement.cs (2)
1378ref ValueQueue<JsonElement> values = ref CollectionsMarshal.GetValueRefOrAddDefault(properties2, prop2.Name, out bool _); 1393ref ValueQueue<JsonElement> values = ref CollectionsMarshal.GetValueRefOrAddDefault(properties2, prop.Name, out bool exists);
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
440ref string[]? pathToSchema = ref CollectionsMarshal.GetValueRefOrAddDefault(_generated, key, out bool exists);
System.Text.RegularExpressions (10)
System\Text\RegularExpressions\RegexWriter.cs (1)
181ref int i = ref CollectionsMarshal.GetValueRefOrAddDefault(_stringTable, str, out bool exists);
System\Text\RegularExpressions\Symbolic\CharSetSolver.cs (1)
390ref BDD? bdd = ref CollectionsMarshal.GetValueRefOrAddDefault(_bddCache, (ordinal, one, zero), out _);
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (3)
339ref BDD? result = ref CollectionsMarshal.GetValueRefOrAddDefault(_setBddCache, set, out _); 461(negate ? charSetSolver.And(CollectionsMarshal.AsSpan(conditions)) : charSetSolver.Or(CollectionsMarshal.AsSpan(conditions)));
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (1)
263ref SymbolicRegexNode<TSet>? result = ref CollectionsMarshal.GetValueRefOrAddDefault(_singletonCache, set, out _);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (4)
1314foreach (ref KeyValuePair<int, int> nfaState in CollectionsMarshal.AsSpan(state.NfaState!.NfaStateSet.Values)) 1328foreach (ref KeyValuePair<int, int> nfaState in CollectionsMarshal.AsSpan(state.NfaState!.NfaStateSet.Values)) 1373foreach (ref KeyValuePair<int, int> sourceState in CollectionsMarshal.AsSpan(sourceStates.Values)) 1427foreach (ref KeyValuePair<int, int> nfaState in CollectionsMarshal.AsSpan(state.NfaState!.NfaStateSet.Values))
UIAutomationClientSideProviders (1)
MS\Internal\AutomationProxies\ProxyHwnd.cs (1)
524return CollectionsMarshal.AsSpan(automationEvents);