1 write to _collection
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
EndpointMetadataCollectionBenchmark.cs (1)
39
_collection
= new EndpointMetadataCollection(_items);
10 references to _collection
Microsoft.AspNetCore.Routing.Microbenchmarks (10)
EndpointMetadataCollectionBenchmark.cs (10)
76
GC.KeepAlive(
_collection
.GetMetadata<IMetadata1>());
77
GC.KeepAlive(
_collection
.GetMetadata<IMetadata2>());
78
GC.KeepAlive(
_collection
.GetMetadata<IMetadata3>());
79
GC.KeepAlive(
_collection
.GetMetadata<IMetadata4>());
80
GC.KeepAlive(
_collection
.GetMetadata<IMetadata5>());
86
foreach (var item in
_collection
.GetOrderedMetadata<IMetadata1>())
91
foreach (var item in
_collection
.GetOrderedMetadata<IMetadata2>())
96
foreach (var item in
_collection
.GetOrderedMetadata<IMetadata3>())
101
foreach (var item in
_collection
.GetOrderedMetadata<IMetadata4>())
106
foreach (var item in
_collection
.GetOrderedMetadata<IMetadata5>())