256 implementations of Add
InMemory.FunctionalTests (2)
Http2\Http2ConnectionTests.cs (1)
294public void Add(KeyValuePair<string, StringValues> item) => _innerHeaders.Add(item);
Http3\Http3ConnectionTests.cs (1)
645public void Add(KeyValuePair<string, StringValues> item) => _innerHeaders.Add(item);
Microsoft.AspNetCore.Components (1)
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
360void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Binding\FormDataMapperTests.cs (1)
2422public void Add(T item) => _inner.Add(item);
Microsoft.AspNetCore.Connections.Abstractions (1)
ConnectionItems.cs (1)
84void ICollection<KeyValuePair<object, object?>>.Add(KeyValuePair<object, object?> item)
Microsoft.AspNetCore.Hosting.Tests (1)
WebHostTests.cs (1)
1416public void Add(KeyValuePair<string, StringValues> item) { }
Microsoft.AspNetCore.Http (4)
HeaderDictionary.cs (1)
194public void Add(KeyValuePair<string, StringValues> item)
Internal\ItemsDictionary.cs (1)
89void ICollection<KeyValuePair<object, object?>>.Add(KeyValuePair<object, object?> item)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
119public void Add(KeyValuePair<TKey, TValue> item)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
203void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
Microsoft.AspNetCore.Http.Abstractions (11)
EndpointFilterInvocationContextOfT.Generated.cs (10)
52public void Add(object? item) 180public void Add(object? item) 315public void Add(object? item) 457public void Add(object? item) 606public void Add(object? item) 762public void Add(object? item) 925public void Add(object? item) 1095public void Add(object? item) 1272public void Add(object? item) 1456public void Add(object? item)
Routing\RouteValueDictionary.cs (1)
360void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item)
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\Validation\ValidationStateDictionary.cs (1)
75public void Add(KeyValuePair<object, ValidationStateEntry> item)
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ModelMetadataTest.cs (1)
754public void Add(string item)
Microsoft.AspNetCore.Mvc.Core (2)
Infrastructure\CopyOnWriteList.cs (1)
47public void Add(T item)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
119public void Add(KeyValuePair<TKey, TValue> item)
Microsoft.AspNetCore.Mvc.IntegrationTests (8)
ActionParametersIntegrationTest.cs (1)
1024public void Add(T item)
CollectionModelBinderIntegrationTest.cs (4)
1252void ICollection<string>.Add(string item) 1321void ICollection<string>.Add(string item) 1392void ICollection<T>.Add(T item) 1461void ICollection<T>.Add(T item)
DictionaryModelBinderIntegrationTest.cs (2)
1565void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> item) 1670void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
TryUpdateModelIntegrationTest.cs (1)
1315public void Add(T item)
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
AttributeDictionary.cs (3)
158public void Add(KeyValuePair<string, string?> item) 379public void Add(string item) 486public void Add(string? item)
TempDataDictionary.cs (1)
248void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> keyValuePair)
ViewDataDictionary.cs (1)
554public void Add(KeyValuePair<string, object?> item)
Microsoft.AspNetCore.Owin (3)
DictionaryStringArrayWrapper.cs (1)
40void ICollection<KeyValuePair<string, string[]>>.Add(KeyValuePair<string, string[]> item) => Inner.Add(Convert(item));
DictionaryStringValuesWrapper.cs (1)
85void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) => Inner.Add(Convert(item));
OwinEnvironment.cs (1)
239void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
Microsoft.AspNetCore.Razor (1)
TagHelpers\TagHelperAttributeList.cs (1)
136public void Add(TagHelperAttribute attribute)
Microsoft.AspNetCore.Razor.Runtime (1)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
119public void Add(KeyValuePair<TKey, TValue> item)
Microsoft.AspNetCore.Routing (1)
RouteEndpointDataSource.cs (1)
353void ICollection<Action<EndpointBuilder>>.Add(Action<EndpointBuilder> convention)
Microsoft.AspNetCore.Server.HttpSys (3)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
165public void Add(KeyValuePair<string, StringValues> item)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item)
UrlPrefixCollection.cs (1)
64public void Add(UrlPrefix item)
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
165public void Add(KeyValuePair<string, StringValues> item)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item)
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http\HttpHeaders.cs (1)
184void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item)
Internal\ServerAddressesCollection.cs (2)
46public void Add(string item) 117public void Add(string item)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Http1\Http1ConnectionTests.cs (1)
1202public void Add(KeyValuePair<string, StringValues> item) => _innerHeaders.Add(item);
Microsoft.AspNetCore.Shared.Tests (5)
ClosedGenericMatcherTest.cs (1)
288void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
119public void Add(KeyValuePair<TKey, TValue> item)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
203void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
165public void Add(KeyValuePair<string, StringValues> item)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item)
Microsoft.Build (15)
Collections\ArrayDictionary.cs (1)
108public void Add(KeyValuePair<TKey, TValue> item)
Collections\CopyOnWritePropertyDictionary.cs (1)
212void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item)
Collections\PropertyDictionary.cs (1)
376void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item)
Collections\ReadOnlyConvertingDictionary.cs (1)
131public void Add(KeyValuePair<K, N> item)
Collections\RetrievableEntryHashSet\HashSet.cs (2)
248void ICollection<T>.Add(T item) 605void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> entry)
Construction\ProjectElementContainer.cs (1)
813public void Add(T item) => ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
CopyOnWriteDictionary.cs (1)
256public void Add(KeyValuePair<string, V> item)
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (3)
51public void Add(T item) => throw new NotSupportedException(); 55public void Add(KeyValuePair<string, T> item) => throw new NotSupportedException(); 126public void Add(T item) => throw new NotSupportedException();
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (1)
168public void Add(T item) => throw new NotSupportedException();
ReadOnlyCollection.cs (1)
99public void Add(T item)
ReadOnlyEmptyCollection.cs (1)
85public void Add(T item)
ReadOnlyEmptyDictionary.cs (1)
217public void Add(KeyValuePair<K, V> item)
Microsoft.Build.Engine (1)
Engine\ToolsetCollection.cs (1)
125public void Add(Toolset item)
Microsoft.Build.Framework (14)
ImmutableSegmentedDictionary`2.cs (1)
363void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
ImmutableSegmentedDictionary`2+Builder.cs (1)
109public void Add(KeyValuePair<TKey, TValue> item)
ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
34void ICollection<TKey>.Add(TKey item)
ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
34void ICollection<TValue>.Add(TValue item)
ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
48void ICollection<TKey>.Add(TKey item)
ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
48void ICollection<TValue>.Add(TValue item)
ImmutableSegmentedList`1.cs (1)
649void ICollection<T>.Add(T item)
ImmutableSegmentedList`1+Builder.cs (1)
52public void Add(T item)
ImmutableSegmentedList`1+ValueBuilder.cs (1)
84public void Add(T item)
SegmentedArray`1.cs (1)
197void ICollection<T>.Add(T value)
SegmentedDictionary`2.cs (3)
205void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 1305void ICollection<TKey>.Add(TKey item) 1505void ICollection<TValue>.Add(TValue item)
SegmentedList`1.cs (1)
221public void Add(T item)
Microsoft.Build.Tasks.Core (4)
CopyOnWriteDictionary.cs (1)
256public void Add(KeyValuePair<string, V> item)
ReadOnlyCollection.cs (1)
99public void Add(T item)
ReadOnlyEmptyCollection.cs (1)
85public void Add(T item)
ReadOnlyEmptyDictionary.cs (1)
217public void Add(KeyValuePair<K, V> item)
Microsoft.Build.Utilities.Core (3)
CopyOnWriteDictionary.cs (1)
256public void Add(KeyValuePair<string, V> item)
ReadOnlyEmptyCollection.cs (1)
85public void Add(T item)
ReadOnlyEmptyDictionary.cs (1)
217public void Add(KeyValuePair<K, V> item)
Microsoft.Extensions.Configuration (2)
ConfigurationManager.cs (2)
210public void Add(IConfigurationSource source) 297public void Add(KeyValuePair<string, object> item)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
ServiceCollection.cs (1)
73void ICollection<ServiceDescriptor>.Add(ServiceDescriptor item)
Microsoft.Extensions.Http (1)
DependencyInjection\DefaultHttpClientBuilderServiceCollection.cs (1)
25public void Add(ServiceDescriptor item)
Microsoft.Extensions.Primitives (1)
StringValues.cs (1)
388void ICollection<string?>.Add(string? item) => throw new NotSupportedException();
Microsoft.Interop.SourceGeneration (1)
ValueEqualityImmutableDictionary.cs (1)
60public void Add(KeyValuePair<T, U> item) => ((ICollection<KeyValuePair<T, U>>)Map).Add(item);
MSBuild (3)
CopyOnWriteDictionary.cs (1)
256public void Add(KeyValuePair<string, V> item)
ReadOnlyEmptyCollection.cs (1)
85public void Add(T item)
ReadOnlyEmptyDictionary.cs (1)
217public void Add(KeyValuePair<K, V> item)
MSBuildTaskHost (4)
CopyOnWriteDictionary.cs (1)
256public void Add(KeyValuePair<string, V> item)
Immutable\ImmutableDictionary.cs (1)
267void ICollection<KeyValuePair<K, V>>.Add(KeyValuePair<K, V> item)
ReadOnlyEmptyCollection.cs (1)
85public void Add(T item)
ReadOnlyEmptyDictionary.cs (1)
217public void Add(KeyValuePair<K, V> item)
PresentationCore (41)
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
713public void Add(KeyValuePair<int, ushort> item)
MS\Internal\FontFace\TypefaceCollection.cs (1)
50public void Add(Typeface item)
MS\Internal\PartialArray.cs (1)
89public void Add(T item)
MS\Internal\TextFormatting\ThousandthOfEmRealDoubles.cs (1)
233public void Add(double value)
MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (1)
175public void Add(Point value)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CharacterBuffer.cs (1)
101public void Add(char item)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\PartialList.cs (1)
127public void Add(T item)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SequentialUshortCollection.cs (1)
39public void Add(ushort item)
System\Windows\FreezableCollection.cs (1)
165public void Add(T value)
System\Windows\Generated\TextDecorationCollection.cs (1)
87public void Add(TextDecoration value)
System\Windows\Media\Animation\Generated\TimelineCollection.cs (1)
94public void Add(Timeline value)
System\Windows\Media\Animation\TimelineClockCollection.cs (1)
81public void Add(Clock item)
System\Windows\Media\CharacterMetricsDictionary.cs (1)
98public void Add(KeyValuePair<int, CharacterMetrics> item)
System\Windows\Media\CultureSpecificStringDictionary.cs (1)
95public void Add(KeyValuePair<XmlLanguage, string> item)
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (1)
93public void Add(BitmapEffect value)
System\Windows\Media\FamilyMapCollection.cs (1)
61public void Add(FontFamilyMap item)
System\Windows\Media\FamilyTypefaceCollection.cs (1)
74public void Add(FamilyTypeface item)
System\Windows\Media\Fonts.cs (1)
303public void Add(Typeface item)
System\Windows\Media\Generated\DoubleCollection.cs (1)
96public void Add(double value)
System\Windows\Media\Generated\DrawingCollection.cs (1)
95public void Add(Drawing value)
System\Windows\Media\Generated\GeneralTransformCollection.cs (1)
95public void Add(GeneralTransform value)
System\Windows\Media\Generated\GeometryCollection.cs (1)
95public void Add(Geometry value)
System\Windows\Media\Generated\GradientStopCollection.cs (1)
95public void Add(GradientStop value)
System\Windows\Media\Generated\Int32Collection.cs (1)
96public void Add(int value)
System\Windows\Media\Generated\PathFigureCollection.cs (1)
96public void Add(PathFigure value)
System\Windows\Media\Generated\PathSegmentCollection.cs (1)
95public void Add(PathSegment value)
System\Windows\Media\Generated\PointCollection.cs (1)
96public void Add(Point value)
System\Windows\Media\Generated\TextEffectCollection.cs (1)
95public void Add(TextEffect value)
System\Windows\Media\Generated\TransformCollection.cs (1)
95public void Add(Transform value)
System\Windows\Media\Generated\VectorCollection.cs (1)
96public void Add(Vector value)
System\Windows\Media\GlyphRun.cs (2)
2149public void Add(bool item) 2251public void Add(ushort item)
System\Windows\Media\GlyphTypeface.cs (2)
1805public void Add(KeyValuePair<ushort, double> item) 1885public void Add(double item)
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (1)
91public void Add(GeneralTransform3D value)
System\Windows\Media3D\Generated\MaterialCollection.cs (1)
91public void Add(Material value)
System\Windows\Media3D\Generated\Model3DCollection.cs (1)
91public void Add(Model3D value)
System\Windows\Media3D\Generated\Point3DCollection.cs (1)
92public void Add(Point3D value)
System\Windows\Media3D\Generated\Transform3DCollection.cs (1)
91public void Add(Transform3D value)
System\Windows\Media3D\Generated\Vector3DCollection.cs (1)
92public void Add(Vector3D value)
System\Windows\Media3D\Visual3DCollection.cs (1)
56public void Add(Visual3D value)
PresentationFramework (19)
MS\Internal\Annotations\ObservableDictionary.cs (1)
155void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> pair)
MS\Internal\Data\RBTree.cs (1)
533public void Add(T item)
MS\Internal\Documents\ContentElementCollection.cs (1)
153abstract public void Add(TItem item);
MS\Internal\ListOfObject.cs (1)
57void ICollection<object>.Add(object item)
MS\Internal\WeakDictionary.cs (3)
38public void Add(KeyType item) 125public void Add(ValueType item) 268public void Add(KeyValuePair<TKey, TValue> item)
MS\Internal\WeakHashSet.cs (1)
22public void Add(T item)
System\Windows\Controls\ColumnDefinition.cs (1)
149public void Add(ColumnDefinition value) // void ICollection<T>.Add(T item)
System\Windows\Controls\CustomDictionarySources.cs (1)
160void ICollection<Uri>.Add(Uri item)
System\Windows\Controls\RowDefinition.cs (1)
149public void Add(RowDefinition value) // void ICollection<T>.Add(T item)
System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
66public void Add(DataGridCellInfo cell)
System\Windows\Data\XmlNamespaceMappingCollection.cs (1)
87public void Add(XmlNamespaceMapping mapping)
System\Windows\Documents\TableCellCollection.cs (1)
117public void Add(TableCell item)
System\Windows\Documents\TableColumnCollection.cs (1)
117public void Add(TableColumn item)
System\Windows\Documents\TableRowCollection.cs (1)
117public void Add(TableRow item)
System\Windows\Documents\TableRowGroupCollection.cs (1)
117public void Add(TableRowGroup item)
System\Windows\Documents\TextElementCollection.cs (1)
79public void Add(TextElementType item)
System\Windows\TriggerActionCollection.cs (1)
104public void Add(TriggerAction value)
System.Collections (8)
System\Collections\Generic\LinkedList.cs (1)
69void ICollection<T>.Add(T value)
System\Collections\Generic\SortedDictionary.cs (3)
59void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 605void ICollection<TKey>.Add(TKey item) 766void ICollection<TValue>.Add(TValue item)
System\Collections\Generic\SortedList.cs (3)
189void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 1030public void Add(TKey key) 1144public void Add(TValue key)
System\Collections\Generic\SortedSet.cs (1)
301void ICollection<T>.Add(T item) => Add(item);
System.Collections.Concurrent (1)
System\Collections\Concurrent\ConcurrentDictionary.cs (1)
1580void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => ((IDictionary<TKey, TValue>)this).Add(keyValuePair.Key, keyValuePair.Value);
System.Collections.Immutable (15)
System\Collections\Frozen\FrozenDictionary.cs (1)
546void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException();
System\Collections\Frozen\FrozenSet.cs (1)
329void ICollection<T>.Add(T item) => throw new NotSupportedException();
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
326public void Add(T item)
System\Collections\Immutable\ImmutableArray_1.cs (1)
1053void ICollection<T>.Add(T item)
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (1)
609public void Add(KeyValuePair<TKey, TValue> item)
System\Collections\Immutable\ImmutableDictionary_2.cs (1)
594void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
System\Collections\Immutable\ImmutableHashSet_1.Builder.cs (1)
385void ICollection<T>.Add(T item)
System\Collections\Immutable\ImmutableHashSet_1.cs (1)
519void ICollection<T>.Add(T item)
System\Collections\Immutable\ImmutableList_1.Builder.cs (1)
192public void Add(T item)
System\Collections\Immutable\ImmutableList_1.cs (1)
962void ICollection<T>.Add(T item) => throw new NotSupportedException();
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (1)
483public void Add(KeyValuePair<TKey, TValue> item)
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (1)
514void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
System\Collections\Immutable\ImmutableSortedSet_1.Builder.cs (1)
342void ICollection<T>.Add(T item)
System\Collections\Immutable\ImmutableSortedSet_1.cs (1)
736void ICollection<T>.Add(T item)
System\Collections\Immutable\KeysOrValuesCollectionAccessor.cs (1)
69public void Add(T item)
System.ComponentModel.Composition (3)
Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs (2)
46public void Add(object item) 101public void Add(object item)
System\ComponentModel\Composition\Hosting\ComposablePartCatalogCollection.cs (1)
43public void Add(ComposablePartCatalog item)
System.Composition.Hosting (1)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (1)
75public void Add(KeyValuePair<string, object> item)
System.Data.Common (1)
System\Data\Common\DbBatchCommandCollection.cs (1)
15public abstract void Add(DbBatchCommand item);
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\ActivityTagsCollection.cs (1)
165public void Add(KeyValuePair<string, object?> item)
System\Diagnostics\Metrics\TagList.cs (1)
180public void Add(KeyValuePair<string, object?> tag)
System.Diagnostics.Process (1)
System\Collections\Specialized\DictionaryWrapper.cs (1)
44public void Add(KeyValuePair<string, string?> item) => Add(item.Key, item.Value);
System.DirectoryServices.AccountManagement (2)
artifacts\obj\System.DirectoryServices.AccountManagement\Debug\net9.0\System.DirectoryServices.AccountManagement.notsupported.cs (2)
238public void Add(System.DirectoryServices.AccountManagement.Principal principal) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); } 368public void Add(T value) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
742public void Add(string item)
System.Linq (6)
System\Linq\Grouping.cs (1)
403void ICollection<TElement>.Add(TElement item) => ThrowHelper.ThrowNotSupportedException();
System\Linq\Lookup.cs (2)
295void ICollection<IGrouping<TKey, TElement>>.Add(IGrouping<TKey, TElement> item) => throw new NotSupportedException(); 322public void Add(IGrouping<TKey, TElement> item) => throw new NotSupportedException();
System\Linq\Range.SpeedOpt.cs (1)
107void ICollection<int>.Add(int item) => ThrowHelper.ThrowNotSupportedException();
System\Linq\Repeat.SpeedOpt.cs (1)
111void ICollection<TResult>.Add(TResult item) => ThrowHelper.ThrowNotSupportedException();
System\Linq\SkipTake.SpeedOpt.cs (1)
191void ICollection<TSource>.Add(TSource item) => ThrowHelper.ThrowNotSupportedException();
System.Linq.Expressions (6)
System\Dynamic\ExpandoObject.cs (3)
378public void Add(string item) 517public void Add(object? item) 673void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item)
System\Dynamic\Utils\ListArgumentProvider.cs (1)
75public void Add(T item)
System\Linq\Expressions\BlockExpression.cs (1)
745public void Add(Expression item)
System\Runtime\CompilerServices\ReadOnlyCollectionBuilder.cs (1)
190public void Add(T item)
System.Linq.Parallel (1)
System\Linq\Parallel\QueryOperators\QueryResults.cs (1)
111void ICollection<T>.Add(T item)
System.Net.Http (3)
System\Net\Http\Headers\HttpHeaderValueCollection.cs (1)
54public void Add(T item)
System\Net\Http\Headers\ObjectCollection.cs (1)
38public void Add(T item)
System\Net\Http\HttpRequestOptions.cs (1)
38void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) => ((IDictionary<string, object?>)Options).Add(item);
System.Net.HttpListener (1)
System\Net\HttpListenerPrefixCollection.cs (1)
76public void Add(string uriPrefix) => _httpListener.AddPrefix(uriPrefix);
System.Net.NetworkInformation (4)
System\Net\NetworkInformation\GatewayIPAddressInformationCollection.cs (1)
51public virtual void Add(GatewayIPAddressInformation address)
System\Net\NetworkInformation\IPAddressInformationCollection.cs (1)
37public virtual void Add(IPAddressInformation address)
System\Net\NetworkInformation\MulticastIPAddressInformationCollection.cs (1)
37public virtual void Add(MulticastIPAddressInformation address)
System\Net\NetworkInformation\UnicastIPAddressInformationCollection.cs (1)
38public virtual void Add(UnicastIPAddressInformation address)
System.Net.Primitives (2)
System\Net\CookieCollection.cs (1)
67public void Add(Cookie cookie)
System\Net\NetworkInformation\IPAddressCollection.cs (1)
35public virtual void Add(IPAddress address)
System.Private.CoreLib (12)
src\libraries\System.Private.CoreLib\src\System\ArraySegment.cs (1)
234void ICollection<T>.Add(T item) => ThrowHelper.ThrowNotSupportedException();
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (3)
254void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => 1506void ICollection<TKey>.Add(TKey item) => 1701void ICollection<TValue>.Add(TValue item) =>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (1)
191void ICollection<T>.Add(T item) => AddIfNotPresent(item, out _);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (1)
196public void Add(T item)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (1)
55public void Add(T item)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (1)
65void ICollection<T>.Add(T value)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (3)
85void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 263void ICollection<TKey>.Add(TKey item) 319void ICollection<TValue>.Add(TValue item)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (1)
54public void Add(KeyValuePair<string, object?> payloadEntry)
System.Private.Xml (4)
System\Xml\Xsl\ListBase.cs (1)
68public virtual void Add(T value)
System\Xml\Xsl\QIL\QilNode.cs (1)
155public virtual void Add(QilNode node)
System\Xml\Xsl\Runtime\XmlQuerySequence.cs (2)
182void ICollection<T>.Add(T value) 678void ICollection<XPathItem>.Add(XPathItem value)
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
139public void Add(KeyValuePair<CoseHeaderLabel, CoseHeaderValue> item) => Add(item.Key, item.Value);
System.Security.Principal.Windows (1)
artifacts\obj\System.Security.Principal.Windows\Debug\net9.0\System.Security.Principal.Windows.notsupported.cs (1)
49public void Add(System.Security.Principal.IdentityReference identity) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); }
System.Speech (1)
artifacts\obj\System.Speech\Debug\net9.0\System.Speech.notsupported.cs (1)
311void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.Add(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue> key) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); }
System.Text.Json (5)
System\Text\Json\JsonPropertyDictionary.KeyCollection.cs (1)
45public void Add(string propertyName) => ThrowHelper.ThrowNotSupportedException_CollectionIsReadOnly();
System\Text\Json\JsonPropertyDictionary.ValueCollection.cs (1)
45public void Add(T jsonNode) => ThrowHelper.ThrowNotSupportedException_CollectionIsReadOnly();
System\Text\Json\Nodes\JsonArray.IList.cs (1)
22public void Add(JsonNode? item)
System\Text\Json\Nodes\JsonObject.IDictionary.cs (1)
44public void Add(KeyValuePair<string, JsonNode?> property) => Add(property.Key, property.Value);
System\Text\Json\Serialization\ConfigurationList.cs (1)
49public void Add(TItem item)
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\CaptureCollection.cs (1)
139void ICollection<Capture>.Add(Capture item) =>
System\Text\RegularExpressions\GroupCollection.cs (1)
153void ICollection<Group>.Add(Group item) =>
System\Text\RegularExpressions\MatchCollection.cs (1)
149void ICollection<Match>.Add(Match item) =>
System.Xaml (3)
System\Xaml\NameScope.cs (1)
142public void Add(KeyValuePair<string, object> item)
System\Xaml\NameScopeDictionary.cs (1)
276void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
System\Xaml\XamlSchemaContext.cs (1)
1410void ICollection<T>.Add(T item)
1986 references to Add
ApiExplorerWebSite (5)
ApiExplorerDataFilter.cs (1)
106responseType.ResponseFormats.Add(new ApiExplorerResponseFormat()
ApiExplorerRouteChangeConvention.cs (1)
23action.Selectors.Add(new SelectorModel
Startup.cs (3)
22options.Conventions.Add(new ApiExplorerVisibilityEnabledConvention()); 23options.Conventions.Add(new ApiExplorerVisibilityDisabledConvention( 25options.Conventions.Add(new ApiExplorerInboundOutboundConvention(
ApplicationModelWebSite (4)
Conventions\CloneActionConvention.cs (1)
30controller.Actions.Add(model);
Conventions\MultipleAreasControllerConvention.cs (1)
28application.Controllers.Add(model);
Startup.cs (2)
13options.Conventions.Add(new ApplicationDescription("Common Application Description")); 16options.Conventions.Add(new MultipleAreasControllerConvention());
BasicWebSite (12)
ConfigureAuthPolicies.cs (4)
17policy.AuthenticationSchemes.Add("Api"); 22policy.AuthenticationSchemes.Add("Api"); 27policy.AuthenticationSchemes.Add("Api"); 28policy.Requirements.Add(Operations.Edit);
Controllers\AsyncActionsController.cs (1)
231_continuations.Add(continuation);
Formatters\CustomFormatter.cs (1)
18SupportedEncodings.Add(Encoding.GetEncoding("utf-8"));
Formatters\PlainTextFormatter.cs (1)
15SupportedEncodings.Add(Encoding.GetEncoding("utf-8"));
Formatters\VCardFormatter_V3.cs (1)
20SupportedEncodings.Add(Encoding.UTF8);
Formatters\VCardFormatter_V4.cs (1)
21SupportedEncodings.Add(Encoding.UTF8);
StartupWithCustomValueProvider.cs (1)
15o.ValueProviderFactories.Add(new CustomValueProviderFactory());
StartupWithoutEndpointRouting.cs (1)
29options.Conventions.Add(new ApplicationDescription("This is a basic website."));
ValueProviders\CustomValueProviderFactory.cs (1)
13context.ValueProviders.Add(new CustomValueProvider(context));
Benchmarks (1)
StartupUsingEndpointRouting.cs (1)
42endpoints.DataSources.Add(endpointDataSource);
ControllersFromServicesWebSite (2)
Startup.cs (2)
22manager.ApplicationParts.Add(new TypesPart( 29manager.ApplicationParts.Add(part);
dotnet-razorpagegenerator (3)
Program.cs (3)
65@class.Modifiers.Add("internal"); 70builder.Features.Add(new SuppressChecksumOptionsFeature()); 71builder.Features.Add(new SuppressMetadataAttributesFeature());
FormatterWebSite (6)
Startup.cs (2)
14options.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Developer))); 15options.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Supplier)));
StartupWithJsonInputFormatter.cs (2)
14options.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Developer))); 15options.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Supplier)));
StringInputFormatter.cs (2)
16SupportedEncodings.Add(Encoding.UTF8); 17SupportedEncodings.Add(Encoding.Unicode);
HelixTestRunner (1)
ProcessUtil.cs (1)
115process.StartInfo.Environment.Add(kvp);
HtmlGenerationWebSite (6)
Controllers\HtmlGeneration_HomeController.cs (1)
55_order.ProductDetails.Add(_products[i]);
StartupWithCultureReplace.cs (5)
23options.SupportedCultures.Add(new CultureInfo("fr-FR")); 24options.SupportedCultures.Add(new CultureInfo("en-GB")); 26options.SupportedUICultures.Add(new CultureInfo("fr-FR")); 27options.SupportedUICultures.Add(new CultureInfo("fr-CA")); 28options.SupportedUICultures.Add(new CultureInfo("en-GB"));
Identity.DefaultUI.WebSite (4)
Services\ContosoEmailSender.cs (1)
14SentEmails.Add(new IdentityEmail(email, subject, htmlMessage));
src\Identity\test\InMemory.Test\InMemoryUserStore.cs (3)
43user.Claims.Add(new PocoUserClaim { ClaimType = claim.Type, ClaimValue = claim.Value, UserId = user.Id }); 161user.Logins.Add(new PocoUserLogin 358user.Tokens.Add(new PocoUserToken
Identity.ExternalClaims (1)
Startup.cs (1)
48o.Scope.Add("https://www.googleapis.com/auth/plus.login");
IIS.FunctionalTests (16)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISCompressionSiteFixture.cs (1)
24deploymentParameters.ServerConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (4)
53deploymentParameters.ServerConfigActionList.Add( 76deploymentParameters.ServerConfigActionList.Add( 97deploymentParameters.ServerConfigActionList.Add( 143deploymentParameters.ServerConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (2)
90deploymentParameters.WebConfigActionList.Add( 92deploymentParameters.WebConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (4)
54deploymentParameters.ServerConfigActionList.Add( 77deploymentParameters.ServerConfigActionList.Add( 98deploymentParameters.ServerConfigActionList.Add( 144deploymentParameters.ServerConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (3)
45parameters.ServerConfigActionList.Add(DuplicateApplication); 56parameters.ServerConfigActionList.Add(DuplicateApplication); 79parameters.ServerConfigActionList.Add(DuplicateApplication);
src\Servers\IIS\IIS\test\IIS.Shared.FunctionalTests\ApplicationInitializationTests.cs (2)
91baseDeploymentParameters.ServerConfigActionList.Add( 112baseDeploymentParameters.ServerConfigActionList.Add(
IIS.LongTests (20)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISCompressionSiteFixture.cs (1)
24deploymentParameters.ServerConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
43deploymentParameters.WebConfigActionList.Add( 140deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nonexistent")); 159deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nonexistent"));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (16)
50deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "%DotnetPath%")); 63deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", path)); 64deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", arguments)); 91deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", dotnetLocationWithoutExtension)); 102deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", dotnetLocationWithoutExtension)); 116deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", path)); 137deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "dotnet")); 474deploymentParameters.WebConfigActionList.Add( 507deploymentParameters.WebConfigActionList.Add( 533deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("hostingModel", "bogus")); 557iisDeploymentParameters.WebConfigActionList.Add((element, _) => action(element)); 945deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nope")); 962deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", "nope")); 1492deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "doesnot")); 1493deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", "start")); 1551parameters.WebConfigActionList.Add((config, contentRoot) =>
IIS.NewHandler.FunctionalTests (20)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISCompressionSiteFixture.cs (1)
24deploymentParameters.ServerConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
43deploymentParameters.WebConfigActionList.Add( 140deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nonexistent")); 159deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nonexistent"));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (16)
50deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "%DotnetPath%")); 63deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", path)); 64deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", arguments)); 91deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", dotnetLocationWithoutExtension)); 102deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", dotnetLocationWithoutExtension)); 116deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", path)); 137deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "dotnet")); 474deploymentParameters.WebConfigActionList.Add( 507deploymentParameters.WebConfigActionList.Add( 533deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("hostingModel", "bogus")); 557iisDeploymentParameters.WebConfigActionList.Add((element, _) => action(element)); 945deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nope")); 962deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", "nope")); 1492deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "doesnot")); 1493deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", "start")); 1551parameters.WebConfigActionList.Add((config, contentRoot) =>
IIS.NewShim.FunctionalTests (20)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISCompressionSiteFixture.cs (1)
24deploymentParameters.ServerConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
43deploymentParameters.WebConfigActionList.Add( 140deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nonexistent")); 159deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nonexistent"));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (16)
50deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "%DotnetPath%")); 63deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", path)); 64deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", arguments)); 91deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", dotnetLocationWithoutExtension)); 102deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", dotnetLocationWithoutExtension)); 116deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", path)); 137deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "dotnet")); 474deploymentParameters.WebConfigActionList.Add( 507deploymentParameters.WebConfigActionList.Add( 533deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("hostingModel", "bogus")); 557iisDeploymentParameters.WebConfigActionList.Add((element, _) => action(element)); 945deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nope")); 962deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", "nope")); 1492deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "doesnot")); 1493deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", "start")); 1551parameters.WebConfigActionList.Add((config, contentRoot) =>
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISCompressionSiteFixture.cs (1)
24deploymentParameters.ServerConfigActionList.Add(
IISExpress.FunctionalTests (33)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISCompressionSiteFixture.cs (1)
24deploymentParameters.ServerConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (4)
53deploymentParameters.ServerConfigActionList.Add( 76deploymentParameters.ServerConfigActionList.Add( 97deploymentParameters.ServerConfigActionList.Add( 143deploymentParameters.ServerConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (2)
90deploymentParameters.WebConfigActionList.Add( 92deploymentParameters.WebConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (4)
54deploymentParameters.ServerConfigActionList.Add( 77deploymentParameters.ServerConfigActionList.Add( 98deploymentParameters.ServerConfigActionList.Add( 144deploymentParameters.ServerConfigActionList.Add(
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (3)
45parameters.ServerConfigActionList.Add(DuplicateApplication); 56parameters.ServerConfigActionList.Add(DuplicateApplication); 79parameters.ServerConfigActionList.Add(DuplicateApplication);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
43deploymentParameters.WebConfigActionList.Add( 140deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nonexistent")); 159deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nonexistent"));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (16)
50deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "%DotnetPath%")); 63deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", path)); 64deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", arguments)); 91deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", dotnetLocationWithoutExtension)); 102deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", dotnetLocationWithoutExtension)); 116deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", path)); 137deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "dotnet")); 474deploymentParameters.WebConfigActionList.Add( 507deploymentParameters.WebConfigActionList.Add( 533deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("hostingModel", "bogus")); 557iisDeploymentParameters.WebConfigActionList.Add((element, _) => action(element)); 945deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "nope")); 962deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", "nope")); 1492deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("processPath", "doesnot")); 1493deploymentParameters.WebConfigActionList.Add(WebConfigHelpers.AddOrModifyAspNetCoreSection("arguments", "start")); 1551parameters.WebConfigActionList.Add((config, contentRoot) =>
InMemory.FunctionalTests (5)
Http2\Http2ConnectionTests.cs (1)
294public void Add(KeyValuePair<string, StringValues> item) => _innerHeaders.Add(item);
Http3\Http3ConnectionTests.cs (1)
645public void Add(KeyValuePair<string, StringValues> item) => _innerHeaders.Add(item);
KestrelMetricsTests.cs (3)
37connectionContext.Features.Get<IConnectionMetricsTagsFeature>().Tags.Add(new KeyValuePair<string, object>("custom", "value!")); 160connectionContext.Features.Get<IConnectionMetricsTagsFeature>().Tags.Add(new KeyValuePair<string, object>("custom", "value!")); 182overridenFeature.Tags.Add(new KeyValuePair<string, object>("test", "Value!"));
IntegrationTestsWebsite (1)
Startup.cs (1)
35endpoints.DataSources.Add(endpoints.ServiceProvider.GetRequiredService<DynamicEndpointDataSource>());
JwtBearerSample (1)
Startup.cs (1)
81Todos.Add(todo);
Microsoft.Arcade.Test.Common (3)
MockEngine.cs (3)
41Messages.Add(e); 47Warnings.Add(e); 53Errors.Add(e);
Microsoft.AspNetCore (2)
WebApplication.cs (1)
250addresses.Add(url);
WebApplicationBuilder.cs (1)
380_hostApplicationBuilder.Services.Add(_genericWebHostServiceDescriptor);
Microsoft.AspNetCore.App.Analyzers (15)
Infrastructure\RoutePattern\RoutePatternParser.cs (13)
106diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_InvalidRouteTemplate, segmentPart.GetSpan())); 119diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_InvalidRouteTemplate, segmentPart.GetSpan())); 135diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_CatchAllMustBeLast, catchAllParameterNode.GetSpan())); 150diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_CannotHaveCatchAllInMultiSegment, catchAllParameterNode.GetSpan())); 178diagnostics.Add(new EmbeddedDiagnostic(message, segmentNode.GetSpan())); 195diagnostics.Add(new EmbeddedDiagnostic(message, parameterNode.GetSpan())); 202diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_CannotHaveConsecutiveParameters, parameterNode.GetSpan())); 266diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_OptionalCannotHaveDefaultValue, parameterNode.GetSpan())); 270diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_CatchAllCannotBeOptional, parameterNode.GetSpan())); 278routeParameters.Add(routeParameter); 282diagnostics.Add(new EmbeddedDiagnostic(Resources.FormatTemplateRoute_RepeatedParameter(name), parameterNode.GetSpan())); 301diagnostics.Add( 343to.Add(diagnostic);
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (2)
81highlightSpans.Add(new AspNetCoreHighlightSpan(parameterSyntax.Identifier.Span, AspNetCoreHighlightSpanKind.Definition)); 103highlightSpans.Add(new AspNetCoreHighlightSpan(reference.Identifier.Span, AspNetCoreHighlightSpanKind.Reference));
Microsoft.AspNetCore.Authentication.Abstractions (1)
AuthenticationOptions.cs (1)
44_schemes.Add(builder);
Microsoft.AspNetCore.Authentication.Facebook (5)
FacebookOptions.cs (5)
26Scope.Add("email"); 27Fields.Add("name"); 28Fields.Add("email"); 29Fields.Add("first_name"); 30Fields.Add("last_name");
Microsoft.AspNetCore.Authentication.Google (3)
GoogleOptions.cs (3)
25Scope.Add("openid"); 26Scope.Add("profile"); 27Scope.Add("email");
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountOptions.cs (1)
25Scope.Add("https://graph.microsoft.com/user.read");
Microsoft.AspNetCore.Authentication.Negotiate (1)
Internal\LdapAdapter.cs (1)
103retrievedClaims.Add(groupCN);
Microsoft.AspNetCore.Authentication.OAuth (1)
ClaimActionCollection.cs (1)
37Actions.Add(action);
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
OpenIdConnectConfigureOptions.cs (1)
118listOption.Add(element);
OpenIdConnectOptions.cs (2)
53Scope.Add("openid"); 54Scope.Add("profile");
Microsoft.AspNetCore.Authentication.Test (56)
CookieTests.cs (2)
366o.Cookie.Extensions.Add("extension0"); 367o.Cookie.Extensions.Add("extension1=value1");
FacebookTests.cs (6)
127o.Scope.Add("foo"); 128o.Scope.Add("bar"); 157o.Scope.Add("foo"); 158o.Scope.Add("bar"); 189o.Scope.Add("foo"); 190o.Scope.Add("bar");
JwtBearerTests.cs (12)
286options.SecurityTokenValidators.Add(new InvalidTokenValidator()); 313options.SecurityTokenValidators.Add(new InvalidTokenValidator(errorType)); 337options.SecurityTokenValidators.Add(new DetailedInvalidTokenValidator(errorType)); 357options.SecurityTokenValidators.Add(new InvalidTokenValidator(errorType)); 376options.SecurityTokenValidators.Add(new InvalidTokenValidator(typeof(SecurityTokenInvalidAudienceException))); 377options.SecurityTokenValidators.Add(new InvalidTokenValidator(typeof(SecurityTokenSignatureKeyNotFoundException))); 511options.SecurityTokenValidators.Add(new BlobTokenValidator(JwtBearerDefaults.AuthenticationScheme)); 537options.SecurityTokenValidators.Add(new BlobTokenValidator("JWT", token => 646options.SecurityTokenValidators.Add(new BlobTokenValidator("JWT")); 681options.SecurityTokenValidators.Add(new BlobTokenValidator("JWT")); 718options.SecurityTokenValidators.Add(new BlobTokenValidator("JWT")); 753options.SecurityTokenValidators.Add(new BlobTokenValidator("JWT"));
JwtBearerTests_Handler.cs (12)
278options.TokenHandlers.Add(new InvalidTokenValidator()); 302options.TokenHandlers.Add(new InvalidTokenValidator(errorType)); 323options.TokenHandlers.Add(new DetailedInvalidTokenValidator(errorType)); 340options.TokenHandlers.Add(new InvalidTokenValidator(errorType)); 356options.TokenHandlers.Add(new InvalidTokenValidator(typeof(SecurityTokenInvalidAudienceException))); 357options.TokenHandlers.Add(new InvalidTokenValidator(typeof(SecurityTokenSignatureKeyNotFoundException))); 486options.TokenHandlers.Add(new BlobTokenValidator(JwtBearerDefaults.AuthenticationScheme)); 509options.TokenHandlers.Add(new BlobTokenValidator("JWT", token => 613options.TokenHandlers.Add(new BlobTokenValidator("JWT")); 645options.TokenHandlers.Add(new BlobTokenValidator("JWT")); 679options.TokenHandlers.Add(new BlobTokenValidator("JWT")); 711options.TokenHandlers.Add(new BlobTokenValidator("JWT"));
MicrosoftAccountTests.cs (6)
139o.Scope.Add("foo"); 140o.Scope.Add("bar"); 157o.Scope.Add("foo"); 158o.Scope.Add("bar"); 175o.Scope.Add("foo"); 176o.Scope.Add("bar");
OAuthTests.cs (6)
179opt.Scope.Add("foo"); 180opt.Scope.Add("bar"); 232opt.Scope.Add("foo"); 233opt.Scope.Add("bar"); 261opt.Scope.Add("foo"); 262opt.Scope.Add("bar");
OpenIdConnect\OpenIdConnectChallengeTests.cs (4)
588opt.Scope.Add("foo"); 589opt.Scope.Add("bar"); 612opt.Scope.Add("foo"); 613opt.Scope.Add("bar");
OpenIdConnect\OpenIdConnectTests.cs (2)
96opt.NonceCookie.Extensions.Add("ExtN"); 149opt.CorrelationCookie.Extensions.Add("ExtC");
OpenIdConnect\TestSettings.cs (5)
230errors.Add($"ExpectedAuthority: {expectedAuthority}"); 259errors.Add($"Parameter {OpenIdConnectParameterNames.SkuTelemetry} is missing"); 279errors.Add($"Parameter {OpenIdConnectParameterNames.MaxAge} is present but it should be absent"); 303errors.Add($"Parameter {parameterName}'s expected value is '{expectedValue}' but its actual value is '{actualValue}'"); 308errors.Add($"Parameter {parameterName} is missing");
WsFederation\WsFederationTest_Handler.cs (1)
294options.TokenHandlers.Add(new TestSecurityTokenHandler());
Microsoft.AspNetCore.Authorization (10)
AuthorizationPolicy.cs (1)
167policyBuilder.AuthenticationSchemes.Add(authType.Trim());
AuthorizationPolicyBuilder.cs (9)
65AuthenticationSchemes.Add(authType); 82Requirements.Add(req); 126Requirements.Add(new ClaimsAuthorizationRequirement(claimType, allowedValues)); 140Requirements.Add(new ClaimsAuthorizationRequirement(claimType, allowedValues: null)); 167Requirements.Add(new RolesAuthorizationRequirement(roles)); 180Requirements.Add(new NameAuthorizationRequirement(userName)); 190Requirements.Add(_denyAnonymousAuthorizationRequirement); 203Requirements.Add(new AssertionRequirement(handler)); 216Requirements.Add(new AssertionRequirement(handler));
Microsoft.AspNetCore.Authorization.Policy (4)
AuthorizationEndpointConventionBuilderExtensions.cs (4)
129endpointBuilder.Metadata.Add(_allowAnonymousMetadata); 142endpointBuilder.Metadata.Add(new AuthorizeAttribute()); 144endpointBuilder.Metadata.Add(policy); 155endpointBuilder.Metadata.Add(data);
Microsoft.AspNetCore.Authorization.Test (16)
AuthorizationEndpointConventionBuilderExtensionsTests.cs (5)
151builder.RequireAuthorization(policyBuilder => policyBuilder.Requirements.Add(requirement)); 177builder.RequireAuthorization(policyBuilder => policyBuilder.Requirements.Add(requirement)); 183endpointModel.Metadata.Add(authorize); 209endpointModel.Metadata.Add(authorize); 258Conventions.Add(convention);
DefaultAuthorizationServiceTests.cs (10)
103services.AddAuthorizationBuilder().AddPolicy("Custom", policy => policy.Requirements.Add(new CustomRequirement())); 129.AddPolicy("Custom", policy => policy.Requirements.Add(new CustomRequirement())) 181services.AddAuthorizationBuilder().AddPolicy("Custom", policy => policy.Requirements.Add(new CustomRequirement())); 643options.AddPolicy("Custom", policy => policy.Requirements.Add(new CustomRequirement())); 664options.AddPolicy("Custom", policy => policy.Requirements.Add(new CustomRequirement())); 705options.AddPolicy("Passthrough", policy => policy.Requirements.Add(new PassThroughRequirement(shouldSucceed))); 1203p.Requirements.Add(new LogRequirement()); 1204p.Requirements.Add(new LogRequirement()); 1237p.Requirements.Add(new LogRequirement()); 1238p.Requirements.Add(new LogRequirement());
PassThroughAuthorizationHandlerTests.cs (1)
35options.AddPolicy("Self", policy => policy.Requirements.Add(willFail));
Microsoft.AspNetCore.Components (1)
src\Http\Routing\src\Tree\TreeRouteBuilder.cs (1)
165InboundEntries.Add(entry);
Microsoft.AspNetCore.Components.Authorization.Tests (1)
src\Components\Shared\test\CapturedBatch.cs (1)
40DiffsInOrder.Add(diffClone);
Microsoft.AspNetCore.Components.Endpoints (12)
Builder\RazorComponentEndpointFactory.cs (7)
39builder.Metadata.Add(new RequireAntiforgeryTokenAttribute()); 44builder.Metadata.Add(attribute); 48builder.Metadata.Add(new SuppressLinkGenerationMetadata()); 49builder.Metadata.Add(HttpMethodsMetadata); 50builder.Metadata.Add(new ComponentTypeMetadata(pageDefinition.Type)); 51builder.Metadata.Add(new RootComponentMetadata(rootComponent)); 52builder.Metadata.Add(configuredRenderModesMetadata);
Builder\RazorComponentsEndpointRouteBuilderExtensions.cs (1)
80endpoints.DataSources.Add(dataSource);
Builder\RenderModeEndpointProvider.cs (2)
44builder.Metadata.Add(new RootComponentMetadata(rootComponent)); 45builder.Metadata.Add(renderMode);
FormMapping\Converters\CollectionAdapters\ImplementingCollectionBufferAdapter.cs (1)
13buffer.Add(element);
FormMapping\Converters\CollectionAdapters\ReadOnlyCollectionBufferAdapter.cs (1)
14buffer.Add(element);
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
RazorComponentEndpointFactoryTest.cs (3)
58builder => builder.Metadata.Add(new AuthorizeAttribute()) 87builder => builder.Metadata.Add(new AuthorizeAttribute()) 142builder => builder.Metadata.Add(new AuthorizeAttribute())
Microsoft.AspNetCore.Components.Forms.Tests (1)
src\Components\Shared\test\CapturedBatch.cs (1)
40DiffsInOrder.Add(diffClone);
Microsoft.AspNetCore.Components.Server (4)
Circuits\CircuitOptionsJavaScriptInitializersConfiguration.cs (1)
28options.JavaScriptInitializers.Add(initializer);
Circuits\RemoteJSRuntime.cs (1)
50JsonSerializerOptions.Converters.Add(new ElementReferenceJsonConverter(ElementReferenceContext));
DependencyInjection\ComponentServiceCollectionExtensions.cs (1)
54options.SupportedProtocols.Add(BlazorPackHubProtocol.ProtocolName);
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (1)
152builder.Metadata.Add(metadata);
Microsoft.AspNetCore.Components.Server.Tests (4)
ComponentEndpointRouteBuilderExtensionsTest.cs (2)
110builder.Finally(b => b.Metadata.Add("first-in")); 111builder.Finally(b => b.Metadata.Add("last-in"));
DependencyInjection\ComponentServiceCollectionExtensionsTest.cs (2)
37options.SupportedProtocols.Add("test"); 63options.SupportedProtocols.Add("test");
Microsoft.AspNetCore.Components.Tests (4)
Routing\RouteTableFactoryTests.cs (1)
1115_routeTemplates.Add((template, handler ?? _handler));
Routing\TemplateParserTests.cs (2)
249Segments.Add(new RoutePatternPathSegment(new List<RoutePatternPart> 259Segments.Add(
src\Components\Shared\test\CapturedBatch.cs (1)
40DiffsInOrder.Add(diffClone);
Microsoft.AspNetCore.Components.Web (1)
WebRenderer.cs (1)
131newJsonOptions.TypeInfoResolverChain.Add(JsonConverterFactoryTypeInfoResolver<DotNetObjectReference<WebRendererInteropMethods>>.Instance);
Microsoft.AspNetCore.Components.Web.Tests (1)
src\Components\Shared\test\CapturedBatch.cs (1)
40DiffsInOrder.Add(diffClone);
Microsoft.AspNetCore.Components.WebAssembly (1)
Services\DefaultWebAssemblyJSRuntime.cs (1)
37JsonSerializerOptions.Converters.Add(new ElementReferenceJsonConverter(ElementReferenceContext));
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
ComponentsWebAssemblyStaticAssetsEndpointConventionBuilderExtensions.cs (1)
54endpoint.Metadata.Add(new WebAssemblyConventionsAppliedMetadata());
WebAssemblyRazorComponentsBuilderExtensions.cs (1)
101builder.Metadata.Add(metadata);
Microsoft.AspNetCore.Components.WebView (1)
Services\WebViewJSRuntime.cs (1)
19JsonSerializerOptions.Converters.Add(
Microsoft.AspNetCore.Connections.Abstractions (3)
ConnectionBuilder.cs (1)
33_components.Add(middleware);
ConnectionItems.cs (1)
86Items.Add(item);
MultiplexedConnectionBuilder.cs (1)
33_components.Add(middleware);
Microsoft.AspNetCore.CookiePolicy.Test (3)
CookieConsentTests.cs (1)
247context.CookieOptions.Extensions.Add("extension");
CookiePolicyTests.cs (2)
370OnAppendCookie = c => c.CookieOptions.Extensions.Add("extension") 421OnAppendCookie = c => c.CookieOptions.Extensions.Add("ext")
Microsoft.AspNetCore.Cors (11)
Infrastructure\CorsEndpointConventionBuilderExtensions.cs (3)
25endpointBuilder.Metadata.Add(new EnableCorsAttribute()); 42endpointBuilder.Metadata.Add(new EnableCorsAttribute(policyName)); 64endpointBuilder.Metadata.Add(new CorsPolicyMetadata(policy));
Infrastructure\CorsPolicyBuilder.cs (7)
61_policy.Origins.Add(normalizedOrigin); 101_policy.Headers.Add(req); 115_policy.ExposedHeaders.Add(req); 130_policy.Methods.Add(req); 163_policy.Origins.Add(CorsConstants.AnyOrigin); 174_policy.Methods.Add("*"); 185_policy.Headers.Add("*");
Infrastructure\CorsService.cs (1)
218target.Add(headerValues[i]);
Microsoft.AspNetCore.Cors.Test (78)
CorsEndpointConventionBuilderExtensionsTests.cs (1)
103Conventions.Add(convention);
CorsMiddlewareTests.cs (6)
113policy.Origins.Add(OriginUrl); 114policy.Methods.Add("PUT"); 160policy.Origins.Add(OriginUrl); 161policy.Methods.Add("PUT"); 162policy.Headers.Add("Header1"); 163policy.ExposedHeaders.Add("AllowedHeader");
CorsPolicyBuilderTests.cs (5)
14originalPolicy.Origins.Add("http://existing.com"); 15originalPolicy.Headers.Add("Existing"); 16originalPolicy.Methods.Add("GET"); 17originalPolicy.ExposedHeaders.Add("ExistingExposed"); 49originalPolicy.Origins.Add("http://existing.com");
CorsPolicyExtensionsTests.cs (4)
14policy.Origins.Add(origin); 34policy.Origins.Add("http://*.domain"); 52policy.Origins.Add(allowedOrigin); 73policy.Origins.Add(allowedOrigin);
CorsPolicyTests.cs (5)
68corsPolicy.Headers.Add("foo"); 69corsPolicy.Headers.Add("bar"); 70corsPolicy.Origins.Add("http://example.com"); 71corsPolicy.Origins.Add("http://example.org"); 72corsPolicy.Methods.Add("GET");
CorsResultTests.cs (4)
51corsResult.AllowedExposedHeaders.Add("foo"); 52corsResult.AllowedHeaders.Add("bar"); 53corsResult.AllowedHeaders.Add("baz"); 54corsResult.AllowedMethods.Add("GET");
CorsServiceTests.cs (53)
54policy.Origins.Add("bar"); 88policy.Origins.Add("example.com"); 109policy.Origins.Add(CorsConstants.AnyOrigin); 125policy.Origins.Add(CorsConstants.AnyOrigin); 144policy.Origins.Add(CorsConstants.AnyOrigin); 163policy.Origins.Add("http://example.com"); 179policy.Origins.Add(CorsConstants.AnyOrigin); 196policy.Origins.Add("http://example.com"); 213policy.Origins.Add("http://example.com"); 214policy.Origins.Add("http://api.example.com"); 248policy.Origins.Add(CorsConstants.AnyOrigin); 264policy.Origins.Add(CorsConstants.AnyOrigin); 265policy.ExposedHeaders.Add("foo"); 281policy.Origins.Add(CorsConstants.AnyOrigin); 282policy.ExposedHeaders.Add("foo"); 283policy.ExposedHeaders.Add("bar"); 284policy.ExposedHeaders.Add("baz"); 300policy.Origins.Add(CorsConstants.AnyOrigin); 301policy.Methods.Add("GET"); 317policy.Origins.Add(CorsConstants.AnyOrigin); 318policy.Methods.Add("PUT"); 340policy.Origins.Add(CorsConstants.AnyOrigin); 341policy.Origins.Add("http://example.com"); 342policy.Methods.Add("*"); 364policy.Methods.Add("*"); 383policy.Origins.Add("http://example.com"); 384policy.Methods.Add("*"); 403policy.Origins.Add(CorsConstants.AnyOrigin); 404policy.Methods.Add("*"); 423policy.Origins.Add(CorsConstants.AnyOrigin); 424policy.Methods.Add("*"); 440policy.Origins.Add(CorsConstants.AnyOrigin); 441policy.Methods.Add("*"); 462policy.Origins.Add(CorsConstants.AnyOrigin); 463policy.Methods.Add("PUT"); 464policy.Methods.Add("DELETE"); 480policy.Origins.Add(CorsConstants.AnyOrigin); 481policy.Methods.Add("*"); 482policy.Headers.Add("*"); 503policy.Origins.Add(CorsConstants.AnyOrigin); 504policy.Methods.Add("*"); 505policy.Headers.Add("*"); 526policy.Origins.Add(CorsConstants.AnyOrigin); 527policy.Methods.Add("*"); 528policy.Headers.Add("match"); 529policy.Headers.Add("foo"); 546policy.Origins.Add("http://example.com"); 547policy.Methods.Add("*"); 548policy.Headers.Add("*"); 909policy.Origins.Add("http://example.com"); 910policy.Origins.Add("http://example-two.com"); 927policy.Origins.Add("http://example-two.com"); 928policy.Origins.Add("http://example-three.com");
Microsoft.AspNetCore.DataProtection (8)
DataProtectionBuilderExtensions.cs (3)
68options.KeyEscrowSinks.Add(sink); 93options.KeyEscrowSinks.Add(implementationInstance); 119options.KeyEscrowSinks.Add(instance);
Internal\KeyManagementOptionsSetup.cs (5)
62options.KeyEscrowSinks.Add(escrowSink); 72options.AuthenticatedEncryptorFactories.Add(new CngGcmAuthenticatedEncryptorFactory(_loggerFactory)); 73options.AuthenticatedEncryptorFactories.Add(new CngCbcAuthenticatedEncryptorFactory(_loggerFactory)); 74options.AuthenticatedEncryptorFactories.Add(new ManagedAuthenticatedEncryptorFactory(_loggerFactory)); 75options.AuthenticatedEncryptorFactories.Add(new AuthenticatedEncryptorFactory(_loggerFactory));
Microsoft.AspNetCore.DataProtection.Tests (10)
KeyManagement\KeyRingBasedDataProtectorTests.cs (1)
234options.AuthenticatedEncryptorFactories.Add(mockEncryptorFactory.Object);
KeyManagement\KeyRingProviderTests.cs (6)
763callSequence.Add("GetCacheExpirationToken"); 772callSequence.Add("GetAllKeys"); 783callSequence.Add("CreateNewKey"); 796callSequence.Add("ResolveDefaultKeyPolicy"); 881options.AuthenticatedEncryptorFactories.Add(mockEncryptorFactory.Object); 898keyManagementOptions.AuthenticatedEncryptorFactories.Add(mockEncryptorFactory.Object);
KeyManagement\XmlKeyManagerTests.cs (3)
107options.Value.AuthenticatedEncryptorFactories.Add(testEncryptorFactory); 205options.Value.AuthenticatedEncryptorFactories.Add(testEncryptorFactory); 206options.Value.KeyEscrowSinks.Add(mockKeyEscrow.Object);
Microsoft.AspNetCore.Diagnostics (3)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (2)
276model.ErrorDetails.Add(exceptionDetails); 277model.CompiledContent.Add(compilationFailure.CompiledContent);
src\Shared\Metrics\MetricsExtensions.cs (1)
38tags.Add(new KeyValuePair<string, object?>(name, value));
Microsoft.AspNetCore.FunctionalTests (2)
WebHostFunctionalTests.cs (2)
229deploymentParameters.EnvironmentVariables.Add(new KeyValuePair<string, string>("aspnetcore_environment", environment)); 230deploymentParameters.EnvironmentVariables.Add(new KeyValuePair<string, string>("envKey", "envValue"));
Microsoft.AspNetCore.Grpc.JsonTranscoding (10)
Internal\Json\JsonConverterHelper.cs (8)
51options.Converters.Add(new NullValueConverter()); 52options.Converters.Add(new ByteStringConverter()); 53options.Converters.Add(new Int64Converter(context)); 54options.Converters.Add(new UInt64Converter(context)); 55options.Converters.Add(new BoolConverter()); 56options.Converters.Add(new JsonConverterFactoryForEnum(context)); 57options.Converters.Add(new JsonConverterFactoryForWrappers(context)); 58options.Converters.Add(new JsonConverterFactoryForWellKnownTypes(context));
Internal\Json\MessageTypeInfoResolver.cs (2)
46typeInfo.Properties.Add(propertyInfo); 58typeInfo.Properties.Add(propertyInfo);
Microsoft.AspNetCore.Grpc.Swagger (8)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (7)
53context.Results.Add(apiDescription); 76apiDescription.SupportedRequestFormats.Add(new ApiRequestFormat { MediaType = "application/json" }); 80apiDescription.SupportedResponseTypes.Add(new ApiResponseType 86apiDescription.SupportedResponseTypes.Add(new ApiResponseType 115apiDescription.ParameterDescriptions.Add(new ApiParameterDescription 137apiDescription.ParameterDescriptions.Add(new ApiParameterDescription 157apiDescription.ParameterDescriptions.Add(new ApiParameterDescription
Internal\XmlComments\GrpcXmlCommentsDocumentFilter.cs (1)
68swaggerDoc.Tags.Add(new OpenApiTag
Microsoft.AspNetCore.HostFiltering.Tests (2)
HostFilteringMiddlewareTests.cs (2)
52options.AllowedHosts.Add("Localhost"); 93options.AllowedHosts.Add("Localhost");
Microsoft.AspNetCore.Hosting (4)
GenericHost\GenericWebHostService.cs (1)
117addresses.Add(value);
Internal\ServiceCollectionExtensions.cs (1)
15clone.Add(service);
Internal\WebHost.cs (1)
272addresses.Add(value);
src\Shared\Metrics\MetricsExtensions.cs (1)
38tags.Add(new KeyValuePair<string, object?>(name, value));
Microsoft.AspNetCore.Hosting.Tests (4)
HostingApplicationDiagnosticsTests.cs (1)
211context.HttpContext.Features.GetRequiredFeature<IHttpMetricsTagsFeature>().Tags.Add(new KeyValuePair<string, object>("custom.tag", "custom.value"));
StartupManagerTests.cs (1)
761_configurationMethodCalledList.Add(instance);
WebHostTests.AsyncDisposable.cs (1)
17services.Add(ServiceDescriptor.Singleton<IServiceProviderFactory<IServiceCollection>>(providerFactory)
WebHostTests.cs (1)
1250StartInstances.Add(startInstance);
Microsoft.AspNetCore.Html.Abstractions (3)
HtmlContentBuilder.cs (3)
64Entries.Add(unencoded); 78Entries.Add(htmlContent); 87Entries.Add(new HtmlString(encoded));
Microsoft.AspNetCore.Http (7)
Internal\ItemsDictionary.cs (1)
92_items.Add(item);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
121WriteDictionary.Add(item);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (1)
138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
211((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Add(item);
Timeouts\RequestTimeoutsIEndpointConventionBuilderExtensions.cs (3)
37builder.Add(b => b.Metadata.Add(new RequestTimeoutAttribute(policyName))); 49builder.Add(b => b.Metadata.Add(policy)); 61builder.Add(b => b.Metadata.Add(_disableRequestTimeoutAttribute));
Microsoft.AspNetCore.Http.Abstractions (1)
CookieBuilder.cs (1)
125options.Extensions.Add(extension);
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
CookieBuilderTests.cs (2)
58builder.Extensions.Add("simple"); 59builder.Extensions.Add("key=value");
RouteValueDictionaryTests.cs (1)
941((ICollection<KeyValuePair<string, object?>>)dict).Add(new KeyValuePair<string, object?>("key", "value"));
Microsoft.AspNetCore.Http.Connections (5)
ConnectionEndpointRouteBuilderExtensions.cs (2)
68e.Metadata.Add(item); 126e.Metadata.Add(data);
Internal\HttpConnectionDispatcher.cs (3)
426response.AvailableTransports.Add(_webSocketAvailableTransport); 431response.AvailableTransports.Add(_serverSentEventsAvailableTransport); 436response.AvailableTransports.Add(_longPollingAvailableTransport);
Microsoft.AspNetCore.Http.Connections.Common (1)
NegotiateProtocol.cs (1)
299availableTransport.TransferFormats.Add(reader.GetString()!);
Microsoft.AspNetCore.Http.Connections.Tests (3)
MapConnectionHandlerTests.cs (3)
41endpoints => endpoints.RequireAuthorization(policy1).RequireAuthorization(pb => pb.Requirements.Add(req)))) 163options.AuthorizationData.Add(new AuthorizeAttribute()); 222options.AuthorizationData.Add(new AuthorizeAttribute());
Microsoft.AspNetCore.Http.Extensions (6)
QueryBuilder.cs (2)
55_params.Add(new KeyValuePair<string, string>(key, value)); 66_params.Add(new KeyValuePair<string, string>(key, value));
RequestDelegateFactory.cs (2)
1025builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(type: null, statusCode: 200, PlaintextContentType)); 1029builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(returnType, statusCode: 200, DefaultAcceptsAndProducesContentType));
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImplementingCollectionBufferAdapter.cs (1)
13buffer.Add(element);
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ReadOnlyCollectionBufferAdapter.cs (1)
14buffer.Add(element);
Microsoft.AspNetCore.Http.Extensions.Tests (30)
HttpResponseJsonExtensionsTests.cs (1)
64options.Converters.Add(new IntegerConverter());
RequestDelegateFactoryTests.cs (13)
859jsonOptions.SerializerOptions.Converters.Add(new TodoJsonConverter()); 3291builder.Metadata.Add(metadataService); 3307builder.Metadata.Add(metadataService); 3324builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.ReturnType }); 3345builder.Metadata.Add(new MetadataCountMetadata { Count = currentMetadataCount }); 3356builder.Metadata.Add(new MetadataCountMetadata { Count = currentMetadataCount }); 3420builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name }); 3425builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Property }); 3445builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name }); 3450builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Parameter }); 3468builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name }); 3473builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Parameter }); 3486builder.Metadata.Add(new RoutePatternMetadata { RoutePattern = reb.RoutePattern?.RawText ?? string.Empty });
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (2)
220jsonOptions.SerializerOptions.Converters.Add(new TodoJsonConverter()); 276jsonOptions.SerializerOptions.Converters.Add(new TodoJsonConverter());
RequestDelegateGenerator\SharedTypes.cs (14)
34builder.Metadata.Add(new CustomMetadata() 42builder.Metadata.Add(new CustomMetadata() 561builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name }); 566builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Parameter }); 596builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name }); 601builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Parameter }); 609builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name }); 614builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Property }); 621builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.ReturnType }); 633builder.Metadata.Add(metadataService); 687builder.Metadata.Add(metadataService); 928builder.Metadata.Add(new MetadataCountMetadata { Count = currentMetadataCount }); 952builder.Metadata.Add(new RoutePatternMetadata { RoutePattern = reb.RoutePattern?.RawText ?? string.Empty }); 961builder.Metadata.Add(new MetadataCountMetadata { Count = currentMetadataCount });
Microsoft.AspNetCore.Http.Features (1)
CookieOptions.cs (1)
128cookie.Extensions.Add(extension);
Microsoft.AspNetCore.Http.Microbenchmarks (14)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (14)
34builder.Metadata.Add(new CustomMetadata() 42builder.Metadata.Add(new CustomMetadata() 561builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name }); 566builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Parameter }); 596builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name }); 601builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Parameter }); 609builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name }); 614builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Property }); 621builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.ReturnType }); 633builder.Metadata.Add(metadataService); 687builder.Metadata.Add(metadataService); 928builder.Metadata.Add(new MetadataCountMetadata { Count = currentMetadataCount }); 952builder.Metadata.Add(new RoutePatternMetadata { RoutePattern = reb.RoutePattern?.RawText ?? string.Empty }); 961builder.Metadata.Add(new MetadataCountMetadata { Count = currentMetadataCount });
Microsoft.AspNetCore.Http.Results (24)
Accepted.cs (1)
84builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status202Accepted, typeof(void)));
AcceptedAtRoute.cs (1)
111builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status202Accepted, typeof(void)));
AcceptedAtRouteOfT.cs (1)
125builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status202Accepted, typeof(TValue), new[] { "application/json" }));
AcceptedOfT.cs (1)
103builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status202Accepted, typeof(TValue), new[] { "application/json" }));
BadRequest.cs (1)
54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(void)));
BadRequestOfT.cs (1)
68builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(TValue), new[] { "application/json" }));
Conflict.cs (1)
54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status409Conflict, typeof(void)));
ConflictOfT.cs (1)
68builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status409Conflict, typeof(TValue), new[] { "application/json" }));
Created.cs (1)
84builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(void)));
CreatedAtRoute.cs (1)
111builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(void)));
CreatedAtRouteOfT.cs (1)
128builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(TValue), new[] { "application/json" }));
CreatedOfT.cs (1)
102builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(TValue), new[] { "application/json" }));
InternalServerError.cs (1)
54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status500InternalServerError, typeof(void)));
InternalServerErrorOfT.cs (1)
68builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status500InternalServerError, typeof(TValue), new[] { "application/json" }));
NoContent.cs (1)
54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status204NoContent, typeof(void)));
NotFound.cs (1)
53builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status404NotFound, typeof(void)));
NotFoundOfT.cs (1)
67builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status404NotFound, typeof(TValue), new[] { "application/json" }));
Ok.cs (1)
53builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(void)));
OkOfT.cs (1)
67builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(TValue), new[] { "application/json" }));
Results.cs (1)
774problemDetails.Extensions.Add(extension);
TypedResults.cs (1)
785problemDetails.Extensions.Add(extension);
UnprocessableEntity.cs (1)
54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status422UnprocessableEntity, typeof(void)));
UnprocessableEntityOfT.cs (1)
68builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status422UnprocessableEntity, typeof(TValue), new[] { "application/json" }));
ValidationProblem.cs (1)
75builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(HttpValidationProblemDetails), new[] { "application/problem+json" }));
Microsoft.AspNetCore.Http.Results.Tests (11)
ResultsOfTHelperTests.cs (4)
103builder.Metadata.Add("Called"); 111builder.Metadata.Add("Called"); 124builder.Metadata.Add("Called"); 132builder.Metadata.Add("Called");
ResultsOfTTests.Generated.cs (7)
1867builder.Metadata.Add(new ResultTypeProvidedMetadata { SourceTypeName = nameof(ProvidesMetadataResult1) }); 1881builder.Metadata.Add(new ResultTypeProvidedMetadata { SourceTypeName = nameof(ProvidesMetadataResult2) }); 1895builder.Metadata.Add(new ResultTypeProvidedMetadata { SourceTypeName = nameof(ProvidesMetadataResult3) }); 1909builder.Metadata.Add(new ResultTypeProvidedMetadata { SourceTypeName = nameof(ProvidesMetadataResult4) }); 1923builder.Metadata.Add(new ResultTypeProvidedMetadata { SourceTypeName = nameof(ProvidesMetadataResult5) }); 1937builder.Metadata.Add(new ResultTypeProvidedMetadata { SourceTypeName = nameof(ProvidesMetadataResult6) }); 1950builder.Metadata.Add(new ResultTypeProvidedMetadata { SourceTypeName = nameof(ProvidesMetadataResult7) });
Microsoft.AspNetCore.HttpLogging (1)
HttpLoggingEndpointConventionBuilderExtensions.cs (1)
41endpointBuilder.Metadata.Add(metadata);
Microsoft.AspNetCore.HttpLogging.Tests (1)
HttpLoggingEndpointConventionBuilderTests.cs (1)
68Conventions.Add(convention);
Microsoft.AspNetCore.HttpOverrides.Tests (3)
ForwardedHeadersMiddlewareTest.cs (3)
233options.KnownProxies.Add(ip); 1015options.KnownProxies.Add(proxy); 1022options.KnownNetworks.Add(new IPNetwork(networkIp, prefixLength));
Microsoft.AspNetCore.HttpsPolicy.Tests (7)
HstsMiddlewareTests.cs (1)
295options.ExcludedHosts.Add(hostUrl);
HttpsRedirectionMiddlewareTests.cs (6)
217server.Features.Get<IServerAddressesFeature>().Addresses.Add(serverAddressFeatureUrl); 260server.Features.Get<IServerAddressesFeature>().Addresses.Add("https://localhost:5050"); 303server.Features.Get<IServerAddressesFeature>().Addresses.Add("https://localhost:5050"); 304server.Features.Get<IServerAddressesFeature>().Addresses.Add("https://localhost:5051"); 345server.Features.Get<IServerAddressesFeature>().Addresses.Add("https://localhost:5050"); 346server.Features.Get<IServerAddressesFeature>().Addresses.Add("https://example.com:5050");
Microsoft.AspNetCore.Identity (4)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
190endpointBuilder.Metadata.Add(new EndpointNameMetadata(confirmEmailEndpointName));
SignInManager.cs (3)
175claims.Add(authenticationMethod); 179claims.Add(amr); 211additionalClaims.Add(new Claim(ClaimTypes.AuthenticationMethod, authenticationMethod));
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (2)
src\Identity\test\Shared\MockHelpers.cs (2)
19mgr.Object.UserValidators.Add(new UserValidator<TUser>()); 20mgr.Object.PasswordValidators.Add(new PasswordValidator<TUser>());
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Infrastructure\ServerFactory.cs (1)
148manager.ApplicationParts.Add(part);
Microsoft.AspNetCore.Identity.InMemory.Test (8)
InMemoryStore.cs (3)
23user.Roles.Add(new PocoUserRole { RoleId = roleEntity.Id, UserId = user.Id }); 45roles.Add(_roles[r].Name); 134role.Claims.Add(new PocoRoleClaim<string> { ClaimType = claim.Type, ClaimValue = claim.Value, RoleId = role.Id });
InMemoryUserStore.cs (3)
43user.Claims.Add(new PocoUserClaim { ClaimType = claim.Type, ClaimValue = claim.Value, UserId = user.Id }); 161user.Logins.Add(new PocoUserLogin 358user.Tokens.Add(new PocoUserToken
src\Identity\test\Shared\MockHelpers.cs (2)
19mgr.Object.UserValidators.Add(new UserValidator<TUser>()); 20mgr.Object.PasswordValidators.Add(new PasswordValidator<TUser>());
Microsoft.AspNetCore.Identity.Specification.Tests (22)
IdentitySpecificationTestBase.cs (4)
168manager.RoleValidators.Add(new AlwaysBadValidator()); 184manager.RoleValidators.Add(new AlwaysBadValidator()); 185manager.RoleValidators.Add(new AlwaysBadValidator()); 205manager.RoleValidators.Add(new AlwaysBadValidator());
TestLogger.cs (3)
37LogMessages.Add(state?.ToString()); 64LogMessages.Add(state.ToString()); 68LogMessages.Add(formatter(state, exception));
UserManagerSpecificationTests.cs (15)
181manager.PasswordValidators.Add(new EmptyBadValidator()); 303manager.UserValidators.Add(new UserValidator<TUser>()); 359manager.UserValidators.Add(new AlwaysBadValidator()); 375manager.UserValidators.Add(new AlwaysBadValidator()); 390manager.UserValidators.Add(new AlwaysBadValidator()); 391manager.UserValidators.Add(new AlwaysBadValidator()); 439manager.PasswordValidators.Add(new AlwaysBadValidator()); 454manager.PasswordValidators.Add(new EmptyBadValidator()); 455manager.PasswordValidators.Add(new AlwaysBadValidator()); 474manager.PasswordValidators.Add(new AlwaysBadValidator()); 488manager.PasswordValidators.Add(new AlwaysBadValidator()); 510manager.PasswordValidators.Add(new AlwaysBadValidator()); 527manager.PasswordValidators.Add(new AlwaysBadValidator()); 543manager.PasswordValidators.Add(new AlwaysBadValidator()); 1025manager.PasswordValidators.Add(new AlwaysBadValidator());
Microsoft.AspNetCore.Identity.Test (7)
SignInManagerTest.cs (3)
274providers.Add("PhoneNumber"); 312providers.Add("PhoneNumber"); 781providers.Add("PhoneNumber");
src\Identity\test\Shared\MockHelpers.cs (2)
19mgr.Object.UserValidators.Add(new UserValidator<TUser>()); 20mgr.Object.PasswordValidators.Add(new PasswordValidator<TUser>());
UserManagerTest.cs (2)
987manager.PasswordValidators.Add(new BadPasswordValidator<PocoUser>(true)); 997manager.PasswordValidators.Add(new BadPasswordValidator<PocoUser>());
Microsoft.AspNetCore.Identity.UI (3)
IdentityBuilderUIExtensions.cs (2)
54apm.ApplicationParts.Add(part); 56apm.FeatureProviders.Add(new ViewVersionFeatureProvider(framework));
IdentityDefaultUIConfigureOptions.cs (1)
41pam => pam.Filters.Add(new ExternalLoginsPageFilter<TUser>()));
Microsoft.AspNetCore.InternalTesting (1)
Tracing\EventAssert.cs (1)
42_payloadAsserters.Add((name, asserter));
Microsoft.AspNetCore.JsonPatch.Tests (1)
TestObjectModels\DynamicTestObject.cs (1)
30((IDictionary<string, object>)_dictionary).Add(item);
Microsoft.AspNetCore.MiddlewareAnalysis.Tests (3)
TestDiagnosticListener.cs (3)
18MiddlewareStarting.Add(name); 24MiddlewareException.Add(name); 30MiddlewareFinished.Add(name);
Microsoft.AspNetCore.Mvc (2)
MvcServiceCollectionExtensions.cs (2)
328partManager.ApplicationParts.Add(new FrameworkAssemblyPart(mvcTagHelpersAssembly)); 334partManager.ApplicationParts.Add(new FrameworkAssemblyPart(mvcRazorAssembly));
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\Validation\ValidationStateDictionary.cs (1)
77((IDictionary<object, ValidationStateEntry>)_inner).Add(item);
Microsoft.AspNetCore.Mvc.ApiExplorer (20)
ApiResponseTypeProvider.cs (2)
314apiResponse.ApiResponseFormats.Add(new ApiResponseFormat 326apiResponse.ApiResponseFormats.Add(new ApiResponseFormat
DefaultApiDescriptionProvider.cs (9)
80context.Results.Add(CreateApiDescription(action, httpMethod, GetGroupName(action, extensionData))); 112apiDescription.ParameterDescriptions.Add(parameter); 118apiDescription.SupportedResponseTypes.Add(apiResponseType); 139apiDescription.SupportedRequestFormats.Add(format); 147apiDescription.SupportedRequestFormats.Add(new ApiRequestFormat 285context.Results.Add(new ApiParameterDescription() 571Context.Results.Add(CreateResult(bindingContext, source, containerName)); 591Context.Results.Add(CreateResult(bindingContext, source ?? ambientSource, containerName)); 643Context.Results.Add(CreateResult(propertyContext, source ?? ambientSource, newContainerName));
EndpointMetadataApiDescriptionProvider.cs (9)
75context.Results.Add(CreateApiDescription(routeEndpoint, httpMethod, methodInfo, disableInferredBody)); 125apiDescription.ParameterDescriptions.Add(parameterDescription); 152apiDescription.ParameterDescriptions.Add(parameterDescription); 159supportedRequestFormats.Add(new ApiRequestFormat 377apiResponseType.ApiResponseFormats.Add(defaultResponseFormat); 382supportedResponseTypes.Add(apiResponseType); 398supportedResponseTypes.Add(defaultApiResponseType); 413apiResponseType.ApiResponseFormats.Add(responseFormat); 445apiResponseFormats.Add(new ApiResponseFormat
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (10)
ApiResponseTypeProviderTest.cs (8)
570actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesAttribute("application/json"), FilterScope.Controller)); 620actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesAttribute("application/json") { Type = typeof(string) }, FilterScope.Controller)); 683actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesAttribute("application/pdf"), FilterScope.Action)); 713actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesAttribute("text/xml") { Type = typeof(BaseModel) }, FilterScope.Action)); 714actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(ValidationProblemDetails), 400, "application/problem+json"), FilterScope.Action)); 715actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(ProblemDetails), 404, "application/problem+json"), FilterScope.Action)); 716actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(409), FilterScope.Action)); 795actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(filterAttribute, FilterScope.Action));
DefaultApiDescriptionProviderTest.cs (2)
2312action.BoundProperties.Add(new ParameterDescriptor() 2331action.Parameters.Add(new ControllerParameterDescriptor()
Microsoft.AspNetCore.Mvc.Core (119)
ApplicationModels\ActionAttributeRouteModel.cs (1)
124selector.ActionConstraints.Add(actionConstraints[i]);
ApplicationModels\AuthorizationApplicationModelProvider.cs (4)
47controllerModel.Filters.Add(GetFilter(_policyProvider, controllerModelAuthData)); 51controllerModel.Filters.Add(new AllowAnonymousFilter()); 59actionModel.Filters.Add(GetFilter(_policyProvider, actionModelAuthData)); 64actionModel.Filters.Add(new AllowAnonymousFilter());
ApplicationModels\ClientErrorResultFilterConvention.cs (1)
27action.Filters.Add(_filterFactory);
ApplicationModels\ConsumesConstraintForFormFileParameterConvention.cs (1)
54action.Filters.Add(new ConsumesAttribute("multipart/form-data"));
ApplicationModels\ControllerActionDescriptorProvider.cs (1)
36context.Results.Add(descriptor);
ApplicationModels\DefaultApplicationModelProvider.cs (10)
48context.Result.Filters.Add(filter); 59context.Result.Controllers.Add(controllerModel); 69controllerModel.ControllerProperties.Add(propertyModel); 82controllerModel.Actions.Add(actionModel); 90actionModel.Parameters.Add(parameterModel); 194controllerModel.Filters.Add(new ControllerActionFilter()); 199controllerModel.Filters.Add(new ControllerResultFilter()); 640selectorModel.ActionConstraints.Add(new HttpMethodActionConstraint(httpMethods)); 641selectorModel.EndpointMetadata.Add(new HttpMethodMetadata(httpMethods)); 675list.Add(item);
ApplicationModels\InvalidModelStateFilterConvention.cs (1)
27action.Filters.Add(_filterFactory);
ApplicationParts\ApplicationPartManager.cs (1)
70ApplicationParts.Add(applicationPart);
Builder\ControllerEndpointRouteBuilderExtensions.cs (9)
198b.Metadata.Add(CreateDynamicControllerMetadata(action, controller, area: null)); 199b.Metadata.Add(new ControllerEndpointDataSourceIdMetadata(dataSource.DataSourceId)); 262b.Metadata.Add(CreateDynamicControllerMetadata(action, controller, area: null)); 263b.Metadata.Add(new ControllerEndpointDataSourceIdMetadata(dataSource.DataSourceId)); 322b.Metadata.Add(CreateDynamicControllerMetadata(action, controller, area)); 323b.Metadata.Add(new ControllerEndpointDataSourceIdMetadata(dataSource.DataSourceId)); 388b.Metadata.Add(CreateDynamicControllerMetadata(action, controller, area)); 389b.Metadata.Add(new ControllerEndpointDataSourceIdMetadata(dataSource.DataSourceId)); 518endpoints.DataSources.Add(dataSource);
ControllerBase.cs (2)
1894problemDetails.Extensions.Add(extension); 2017validationProblem.Extensions.Add(extension);
Controllers\ControllerFeatureProvider.cs (1)
28feature.Controllers.Add(type);
DependencyInjection\ApplicationModelConventionExtensions.cs (4)
61conventions.Add(new ControllerApplicationModelConvention(controllerModelConvention)); 78conventions.Add(new ActionApplicationModelConvention(actionModelConvention)); 95conventions.Add(new ParameterApplicationModelConvention(parameterModelConvention)); 112conventions.Add(new ParameterBaseApplicationModelConvention(parameterModelConvention));
DependencyInjection\MvcCoreMvcBuilderExtensions.cs (1)
89manager.ApplicationParts.Add(applicationPart);
DependencyInjection\MvcCoreMvcCoreBuilderExtensions.cs (1)
171manager.ApplicationParts.Add(applicationPart);
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
68manager.FeatureProviders.Add(new ControllerFeatureProvider());
Formatters\AcceptHeaderParser.cs (1)
37parsedValues.Add(output);
Formatters\StringOutputFormatter.cs (2)
20SupportedEncodings.Add(Encoding.UTF8); 21SupportedEncodings.Add(Encoding.Unicode);
Formatters\SystemTextJsonInputFormatter.cs (2)
32SupportedEncodings.Add(UTF8EncodingWithoutBOM); 33SupportedEncodings.Add(UTF16EncodingLittleEndian);
Formatters\SystemTextJsonOutputFormatter.cs (2)
28SupportedEncodings.Add(Encoding.UTF8); 29SupportedEncodings.Add(Encoding.Unicode);
Infrastructure\MvcCoreMvcOptionsSetup.cs (45)
48options.ModelBinderProviders.Add(new BinderTypeModelBinderProvider()); 49options.ModelBinderProviders.Add(new ServicesModelBinderProvider()); 50options.ModelBinderProviders.Add(new BodyModelBinderProvider(options.InputFormatters, _readerFactory, _loggerFactory, options)); 51options.ModelBinderProviders.Add(new HeaderModelBinderProvider()); 52options.ModelBinderProviders.Add(new FloatingPointTypeModelBinderProvider()); 53options.ModelBinderProviders.Add(new EnumTypeModelBinderProvider(options)); 54options.ModelBinderProviders.Add(new DateTimeModelBinderProvider()); 55options.ModelBinderProviders.Add(new SimpleTypeModelBinderProvider()); 56options.ModelBinderProviders.Add(new TryParseModelBinderProvider()); 57options.ModelBinderProviders.Add(new CancellationTokenModelBinderProvider()); 58options.ModelBinderProviders.Add(new ByteArrayModelBinderProvider()); 59options.ModelBinderProviders.Add(new FormFileModelBinderProvider()); 60options.ModelBinderProviders.Add(new FormCollectionModelBinderProvider()); 61options.ModelBinderProviders.Add(new KeyValuePairModelBinderProvider()); 62options.ModelBinderProviders.Add(new DictionaryModelBinderProvider()); 63options.ModelBinderProviders.Add(new ArrayModelBinderProvider()); 64options.ModelBinderProviders.Add(new CollectionModelBinderProvider()); 65options.ModelBinderProviders.Add(new ComplexObjectModelBinderProvider()); 85options.ValueProviderFactories.Add(new FormValueProviderFactory()); 86options.ValueProviderFactories.Add(new RouteValueProviderFactory()); 87options.ValueProviderFactories.Add(new QueryStringValueProviderFactory()); 88options.ValueProviderFactories.Add(new JQueryFormValueProviderFactory()); 89options.ValueProviderFactories.Add(new FormFileValueProviderFactory()); 95options.ModelValidatorProviders.Add(new DefaultModelValidatorProvider()); 104options.ModelMetadataDetailsProviders.Add(new HasValidatorsValidationMetadataProvider(options.ModelValidatorProviders)); 111modelMetadataDetailsProviders.Add(new ExcludeBindingMetadataProvider(typeof(Type))); 113modelMetadataDetailsProviders.Add(new DefaultBindingMetadataProvider()); 114modelMetadataDetailsProviders.Add(new DefaultValidationMetadataProvider()); 116modelMetadataDetailsProviders.Add(new BindingSourceMetadataProvider(typeof(CancellationToken), BindingSource.Special)); 117modelMetadataDetailsProviders.Add(new BindingSourceMetadataProvider(typeof(IFormFile), BindingSource.FormFile)); 118modelMetadataDetailsProviders.Add(new BindingSourceMetadataProvider(typeof(IFormCollection), BindingSource.FormFile)); 119modelMetadataDetailsProviders.Add(new BindingSourceMetadataProvider(typeof(IFormFileCollection), BindingSource.FormFile)); 120modelMetadataDetailsProviders.Add(new BindingSourceMetadataProvider(typeof(IEnumerable<IFormFile>), BindingSource.FormFile)); 123modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Type))); 124modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Delegate))); 125modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(MethodInfo))); 126modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(MemberInfo))); 127modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(ParameterInfo))); 128modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Assembly))); 129modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Uri))); 130modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(CancellationToken))); 131modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(IFormFile))); 132modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(IFormCollection))); 133modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(IFormFileCollection))); 134modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Stream)));
ModelBinding\Binders\CollectionModelBinder.cs (1)
479targetCollection.Add(element);
ModelBinding\Binders\FormFileModelBinder.cs (1)
155postedFiles.Add(file);
ModelBinding\Binders\HeaderModelBinder.cs (1)
182collection.Add(values[i]);
ModelBinding\FormFileValueProviderFactory.cs (1)
55context.ValueProviders.Add(valueProvider);
ModelBinding\FormValueProviderFactory.cs (1)
59context.ValueProviders.Add(valueProvider);
ModelBinding\JQueryFormValueProviderFactory.cs (1)
59context.ValueProviders.Add(valueProvider);
ModelBinding\JQueryQueryStringValueProviderFactory.cs (1)
28context.ValueProviders.Add(valueProvider);
ModelBinding\Metadata\DefaultValidationMetadataProvider.cs (1)
31context.ValidationMetadata.ValidatorMetadata.Add(attribute);
ModelBinding\PropertyValueSetter.cs (1)
66targetCollection.Add(item);
ModelBinding\QueryStringValueProviderFactory.cs (1)
29context.ValueProviders.Add(valueProvider);
ModelBinding\RouteValueProviderFactory.cs (1)
22context.ValueProviders.Add(valueProvider);
Routing\ActionEndpointFactory.cs (13)
230builder.Metadata.Add(new RouteNameMetadata(route.RouteName)); 240builder.Metadata.Add(new EndpointNameMetadata(route.RouteName)); 366builder.Metadata.Add(d); 370builder.Metadata.Add(action); 390builder.Metadata.Add(new EndpointNameMetadata(routeName)); 395builder.Metadata.Add(new DataTokensMetadata(dataTokens)); 398builder.Metadata.Add(new RouteNameMetadata(routeName)); 405builder.Metadata.Add(filter); 421builder.Metadata.Add(new HttpMethodMetadata(httpMethodActionConstraint.HttpMethods)); 426builder.Metadata.Add(new AcceptsMetadata(consumesAttribute.ContentTypes.ToArray())); 431builder.Metadata.Add(actionConstraint); 438builder.Metadata.Add(new SuppressLinkGenerationMetadata()); 443builder.Metadata.Add(new SuppressMatchingMetadata());
Routing\ControllerActionEndpointDataSource.cs (2)
150b.Metadata.Add(new DynamicControllerRouteValueTransformerMetadata(transformerType, state)); 151b.Metadata.Add(new ControllerEndpointDataSourceIdMetadata(DataSourceId));
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
121WriteDictionary.Add(item);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (1)
138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item);
Microsoft.AspNetCore.Mvc.Core.Test (246)
AcceptedAtActionResultTests.cs (1)
240routeData.Routers.Add(Mock.Of<IRouter>());
AcceptedAtRouteResultTests.cs (1)
148routeData.Routers.Add(Mock.Of<IRouter>());
AcceptedResultTests.cs (1)
106routeData.Routers.Add(Mock.Of<IRouter>());
ApplicationModels\ActionModelTest.cs (6)
25action.Parameters.Add(parameter); 28action.Selectors.Add(new SelectorModel() 69selectorModel.ActionConstraints.Add(new HttpMethodActionConstraint(new string[] { "GET" })); 70action.Selectors.Add(selectorModel); 76action.Filters.Add(new MyFilterAttribute()); 79action.Properties.Add(new KeyValuePair<object, object>("test key", "test value"));
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (8)
28controllerModel.Actions.Add(actionModel); 31context.Result.Controllers.Add(controllerModel); 56controllerModel.Actions.Add(actionModel); 63actionModel.Parameters.Add(parameterModel); 66context.Result.Controllers.Add(controllerModel); 99controllerModel.Actions.Add(actionModel); 106actionModel.Parameters.Add(parameterModel); 109context.Result.Controllers.Add(controllerModel);
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (2)
50actionModel.Filters.Add(new AuthorizeFilter()); 175controllerModel.Actions.Add(actionModel);
ApplicationModels\ControllerActionDescriptorBuilderTest.cs (14)
22controller.ControllerProperties.Add( 31controller.ControllerProperties.Add( 37applicationModel.Controllers.Add(controller); 41actionModel.Selectors.Add(new SelectorModel()); 43controller.Actions.Add(actionModel); 69applicationModel.Controllers.Add(controller); 73actionModel.Selectors.Add(new SelectorModel()); 75controller.Actions.Add(actionModel); 95applicationModel.Controllers.Add(controller); 99actionModel.Selectors.Add(new SelectorModel()); 101controller.Actions.Add(actionModel); 121applicationModel.Controllers.Add(controller); 125actionModel.Selectors.Add(new SelectorModel()); 128controller.Actions.Add(actionModel);
ApplicationModels\ControllerActionDescriptorProviderTests.cs (10)
1151options.Value.Conventions.Add(applicationConvention.Object); 1158applicationModel.Controllers.Add(controller); 1163controller.Actions.Add(actionModel); 1169actionModel.Parameters.Add(parameterModel); 1293context.Results.Add(new ActionDescriptor() 1301context.Results.Add(new ActionDescriptor() 1368options.Value.Conventions.Add(convention); 1384manager.ApplicationParts.Add(new TestApplicationPart(controllerTypes)); 1385manager.FeatureProviders.Add(new TestFeatureProvider()); 1954action.Selectors.Add(new SelectorModel()
ApplicationModels\ControllerModelTest.cs (8)
22controller.Actions.Add(action); 25controller.ControllerProperties.Add(new PropertyModel( 30controller.Selectors.Add(new SelectorModel() { AttributeRouteModel = route }); 73selectorModel.ActionConstraints.Add(new HttpMethodActionConstraint(new string[] { "GET" })); 74controller.Selectors.Add(selectorModel); 77controller.Filters.Add(new MyFilterAttribute()); 79controller.Properties.Add(new KeyValuePair<object, object>("test key", "test value")); 80controller.ControllerProperties.Add(
ApplicationModels\EndpointMetadataProviderTest.cs (12)
107builder => builder.Metadata.Add(new CustomEndpointMetadata() { Source = MetadataSource.Caller }), 111builder => builder.Metadata.Add(new CustomEndpointMetadata() { Source = MetadataSource.Finally }), 150builder => builder.Metadata.Add(new ConsumesAttribute("application/json")), 171builder => builder.Metadata.Add(new ConsumesAttribute("application/json")), 192builder => builder.Metadata.Add(new ConsumesAttribute("application/json")), 239manager.ApplicationParts.Add(new TestApplicationPart(controllerType)); 240manager.FeatureProviders.Add(new TestFeatureProvider()); 396builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name }); 401builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Parameter }); 409builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.ReturnType }); 419builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.ReturnType }); 433builder.Metadata.Add(new RoutePatternMetadata { RoutePattern = reb.RoutePattern.RawText });
ApplicationModels\ParameterModelTest.cs (1)
25parameter.Properties.Add(new KeyValuePair<object, object>("test key", "test value"));
ApplicationModels\PropertyModelTest.cs (1)
21propertyModel.Properties.Add(new KeyValuePair<object, object>("test key", "test value"));
ApplicationModels\RouteTokenTransformerConventionTest.cs (2)
19model.Selectors.Add(new SelectorModel() 39model.Selectors.Add(new SelectorModel()
ApplicationParts\ApplicationPartManagerTest.cs (15)
13manager.ApplicationParts.Add(new ControllersPart("ControllersPartA")); 14manager.ApplicationParts.Add(new ViewComponentsPart("ViewComponentsPartB")); 15manager.ApplicationParts.Add(new ControllersPart("ControllersPartC")); 16manager.FeatureProviders.Add( 17new ControllersFeatureProvider((f, v) => f.Values.Add($"ControllersFeatureProvider1{v}"))); 18manager.FeatureProviders.Add( 19new ControllersFeatureProvider((f, v) => f.Values.Add($"ControllersFeatureProvider2{v}"))); 42manager.ApplicationParts.Add(new ControllersPart("ControllersPart")); 43manager.FeatureProviders.Add( 44new ControllersFeatureProvider((f, v) => f.Values.Add($"ControllersFeatureProvider{v}"))); 45manager.FeatureProviders.Add( 46new NotControllersedFeatureProvider((f, v) => f.Values.Add($"ViewComponentsFeatureProvider{v}"))); 63manager.ApplicationParts.Add(new ViewComponentsPart("ViewComponentsPart")); 64manager.FeatureProviders.Add( 65new ControllersFeatureProvider((f, v) => f.Values.Add($"ControllersFeatureProvider{v}")));
Authorization\AuthorizeFilterTest.cs (21)
43authorizationContext.Filters.Add(authorizeFilter); 58authorizationContext.Filters.Add(authorizeFilter); 74authorizationContext.Filters.Add(authorizeFilter); 109authorizationContext.Filters.Add(authorizeFilter); 162authorizationContext.Filters.Add(authorizeFilter); 178authorizationContext.Filters.Add(new AllowAnonymousFilter()); 264authorizationContext.Filters.Add(authorizeFilter); 266authorizationContext.Filters.Add(secondFilter); 288authorizationContext.Filters.Add(authorizeFilter); 290authorizationContext.Filters.Add(secondFilter); 292authorizationContext.Filters.Add(thirdFilter); 318authorizationContext.Filters.Add(authorizeFilter); 320authorizationContext.Filters.Add(secondFilter); 336authorizationContext.Filters.Add(authorizeFilter); 338authorizationContext.Filters.Add(secondFilter); 354authorizationContext.Filters.Add(authorizeFilter); 355authorizationContext.Filters.Add(new DerivedAuthorizeFilter()); 356authorizationContext.Filters.Add(new DerivedAuthorizeFilter()); 358authorizationContext.Filters.Add(lastFilter); 393authorizationContext.Filters.Add(authorizeFilter); 410authorizationContext.Filters.Add(authorizeFilter);
ChallengeResultTest.cs (2)
30routeData.Routers.Add(Mock.Of<IRouter>()); 55routeData.Routers.Add(Mock.Of<IRouter>());
ContentResultTest.cs (1)
249routeData.Routers.Add(Mock.Of<IRouter>());
ControllerBaseTest.cs (3)
2701controller.ControllerContext.ValueProviderFactories.Add(valueProviderFactory.Object); 3102.Callback<ModelValidatorProviderContext>(c => c.Results.Add(validator1)); 3139.Callback<ModelValidatorProviderContext>(c => c.Results.Add(validator1));
Controllers\ControllerBinderDelegateProviderTest.cs (25)
33actionDescriptor.Parameters.Add( 89actionDescriptor.BoundProperties.Add( 144actionDescriptor.Parameters.Add( 186actionDescriptor.Parameters.Add( 228actionDescriptor.Parameters.Add( 279actionDescriptor.Parameters.Add( 329actionDescriptor.Parameters.Add( 377actionDescriptor.Parameters.Add( 427actionDescriptor.Parameters.Add( 475actionDescriptor.BoundProperties.Add( 523actionDescriptor.BoundProperties.Add( 570actionDescriptor.BoundProperties.Add( 619actionDescriptor.BoundProperties.Add( 658actionDescriptor.BoundProperties.Add( 698actionDescriptor.BoundProperties.Add( 739actionDescriptor.BoundProperties.Add( 781actionDescriptor.Parameters.Add(new ParameterDescriptor 794actionDescriptor.BoundProperties.Add(new ParameterDescriptor 844actionDescriptor.Parameters.Add(new ParameterDescriptor 857actionDescriptor.BoundProperties.Add(new ParameterDescriptor 952actionDescriptor.BoundProperties.Add( 1010actionDescriptor.BoundProperties.Add( 1038controllerContext.ValueProviderFactories.Add(new SimpleValueProviderFactory()); 1226controllerContext.ValueProviderFactories.Add(valueProviderFactory.Object); 1264context.ValueProviderFactories.Add(new SimpleValueProviderFactory());
Controllers\ControllerFeatureProviderTest.cs (2)
386manager.ApplicationParts.Add(new TestApplicationPart(types)); 387manager.FeatureProviders.Add(new ControllerFeatureProvider());
CreatedAtActionResultTests.cs (1)
69routeData.Routers.Add(Mock.Of<IRouter>());
CreatedAtRouteResultTests.cs (1)
82routeData.Routers.Add(Mock.Of<IRouter>());
CreatedResultTests.cs (1)
115routeData.Routers.Add(Mock.Of<IRouter>());
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (23)
19app.Controllers.Add(controllerModel); 22controllerModel.Actions.Add(actionModel); 26actionModel.Parameters.Add(parameterModel); 65app.Controllers.Add(controllerModel1); 66app.Controllers.Add(controllerModel2); 123app.Controllers.Add(controllerModel1); 124app.Controllers.Add(controllerModel2); 153app.Controllers.Add(new ControllerModel(typeof(HelloController).GetTypeInfo(), Array.Empty<object>())); 154app.Controllers.Add(new ControllerModel(typeof(WorldController).GetTypeInfo(), Array.Empty<object>())); 193applicationModel.Controllers.Add( 213applicationModel.Controllers.Add( 235controllerModel.Actions.Add( 240applicationModel.Controllers.Add(controllerModel); 260controllerModel.ControllerProperties.Add( 265applicationModel.Controllers.Add(controllerModel); 286controllerModel.ControllerProperties.Add( 291applicationModel.Controllers.Add(controllerModel); 309app.Controllers.Add(controllerModel); 314controllerModel.Actions.Add(actionModel); 321actionModel.Parameters.Add(parameterModel); 342app.Controllers.Add(controllerModel); 347controllerModel.Actions.Add(actionModel); 354actionModel.Parameters.Add(parameterModel);
DependencyInjection\MvcBuilderExtensionsTest.cs (4)
117manager.ApplicationParts.Add(new TestApplicationPart(typeof(ControllerOne), typeof(ControllerTwo))); 118manager.FeatureProviders.Add(new TestFeatureProvider()); 171manager.ApplicationParts.Add(new TestApplicationPart(types)); 172manager.FeatureProviders.Add(new ControllerFeatureProvider());
Filters\FilterFactoryTest.cs (1)
214providerContext.Results.Add(
Formatters\InputFormatterTest.cs (2)
323formatter.SupportedTypes.Add(typeof(string)); 338formatter.SupportedTypes.Add(typeof(string));
Formatters\JsonOutputFormatterTestBase.cs (1)
209formatter.SupportedEncodings.Add(encoding);
Formatters\TextInputFormatterTest.cs (10)
17formatter.SupportedEncodings.Add(Encoding.ASCII); 67formatter.SupportedEncodings.Add(Encoding.UTF32); 90formatter.SupportedEncodings.Add(Encoding.UTF32); 91formatter.SupportedEncodings.Add(Encoding.UTF8); 116formatter.SupportedEncodings.Add(Encoding.UTF32); 117formatter.SupportedEncodings.Add(Encoding.UTF8); 150formatter.SupportedEncodings.Add(Encoding.UTF32); 151formatter.SupportedEncodings.Add(Encoding.ASCII); 184formatter.SupportedEncodings.Add(Encoding.UTF8); 185formatter.SupportedEncodings.Add(Encoding.UTF32);
Formatters\TextOutputFormatterTests.cs (4)
50formatter.SupportedEncodings.Add(Encoding.GetEncoding(supportedEncoding)); 111formatter.SupportedEncodings.Add(Encoding.UTF8); 142formatter.SupportedEncodings.Add(Encoding.UTF8); 168formatter.SupportedEncodings.Add(Encoding.Unicode);
Infrastructure\ActionSelectorTest.cs (3)
1018manager.ApplicationParts.Add(new TestApplicationPart(controllerTypes)); 1019manager.FeatureProviders.Add(new TestFeatureProvider()); 1100routeData.Routers.Add(new Mock<IRouter>(MockBehavior.Strict).Object);
Infrastructure\ControllerActionInvokerProviderTest.cs (1)
57actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(filterAttribute, FilterScope.Action));
Infrastructure\ControllerActionInvokerTest.cs (2)
208resourceExecutingContext.ValueProviderFactories.Add(valueProviderFactory2); 1661actionDescriptor.Parameters.Add(new ControllerParameterDescriptor()
Infrastructure\DefaultActionDescriptorCollectionProviderTest.cs (4)
83context.Results.Add(expected1); 87context.Results.Add(expected2); 91context.Results.Add(expected3); 167context.Results.Add(value);
Infrastructure\DefaultOutputFormatterSelectorTest.cs (3)
399SupportedEncodings.Add(Encoding.UTF8); 415SupportedEncodings.Add(Encoding.UTF8); 430SupportedEncodings.Add(Encoding.UTF8);
Infrastructure\ObjectResultExecutorTest.cs (3)
506SupportedEncodings.Add(Encoding.UTF8); 526SupportedEncodings.Add(Encoding.UTF8); 541SupportedEncodings.Add(Encoding.UTF8);
LocalRedirectResultTest.cs (1)
131routeData.Routers.Add(new Mock<IRouter>().Object);
ModelBinding\Binders\BodyModelBinderTests.cs (1)
730SupportedEncodings.Add(Encoding.UTF8);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (1)
1254options.Value.ModelBinderProviders.Add(new TestableComplexTypeModelBinderProvider());
ModelBinding\Metadata\DefaultValidationMetadataProviderTest.cs (1)
156context.ValidationMetadata.ValidatorMetadata.Add(attribute);
ModelBinding\ModelBinderFactoryTest.cs (15)
44options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(_ => null)); 70options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 110options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 145options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 186options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 224options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 255options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 425options.Value.ModelBinderProviders.Add(widgetProvider); 426options.Value.ModelBinderProviders.Add(widgetIdProvider); 487options.Value.ModelBinderProviders.Add(widgetProvider); 488options.Value.ModelBinderProviders.Add(widgetIdProvider); 541options.Value.ModelBinderProviders.Add(widgetProvider); 542options.Value.ModelBinderProviders.Add(widgetIdProvider); 605options.Value.ModelBinderProviders.Add(widgetProvider); 606options.Value.ModelBinderProviders.Add(widgetIdProvider);
ModelBinding\ParameterBinderTest.cs (3)
155d.ValidatorMetadata.Add(attribute); 162d.ValidatorMetadata.Add(attribute); 171d.ValidatorMetadata.Add(attribute);
ModelBinding\Validation\CompositeModelValidatorProviderTest.cs (3)
23c.Results.Add(validator1); 24c.Results.Add(validator2); 31c.Results.Add(validator3);
MvcCoreLoggerExtensionsTest.cs (3)
52action.RouteValues.Add(routeValue); 82action.RouteValues.Add(routeValue); 111action.RouteValues.Add(routeValue);
Routing\ControllerActionEndpointDataSourceTest.cs (10)
329dataSource.AddRoute("1", "/1/{controller}/{action}/{id?}", null, null, null).Add(b => b.Metadata.Add("A")); 330dataSource.AddRoute("2", "/2/{controller}/{action}/{id?}", null, null, null).Add(b => b.Metadata.Add("B")); 411dataSource.AddRoute("1", "/1/{controller}/{action}/{id?}", null, null, null).Add(b => b.Metadata.Add("A")); 412dataSource.AddRoute("2", "/2/{controller}/{action}/{id?}", null, null, null).Add(b => b.Metadata.Add("B")); 422b => b.Metadata.Add(new GroupMetadata()), 423b => b.Metadata.Add("group") 512builder1.Finally(b => b.Metadata.Add("A1")); 513builder1.Finally(b => b.Metadata.Add("A2")); 515builder2.Finally(b => b.Metadata.Add("B1")); 516builder2.Finally(b => b.Metadata.Add("B2"));
Routing\EndpointRoutingUrlHelperTest.cs (1)
266metadata.Add(new RouteNameMetadata(routeName));
Routing\KnownRouteValueConstraintTests.cs (1)
281.Callback<ActionDescriptorProviderContext>(c => c.Results.Add(actionDescriptor));
Routing\UrlHelperTest.cs (5)
25actionContext.RouteData.Routers.Add(defaultRoutes); 40actionContext.RouteData.Routers.Add(router); 56actionContext.RouteData.Routers.Add(router); 79actionContext.RouteData.Routers.Add(router); 121routeBuilder.Routes.Add(mockHttpRoute.Object);
TestFeatureProvider.cs (1)
28feature.Controllers.Add(type);
Microsoft.AspNetCore.Mvc.Core.TestCommon (3)
SimpleValueProviderFactory.cs (1)
24context.ValueProviders.Add(_valueProvider);
TestModelBinderFactory.cs (2)
39options.Value.ModelBinderProviders.Add(provider); 61options.Value.ModelBinderProviders.Add(provider);
Microsoft.AspNetCore.Mvc.Cors (4)
CorsApplicationModelProvider.cs (4)
50controllerModel.Filters.Add(new CorsAuthorizationFilterFactory(enableCors.PolicyName)); 56controllerModel.Filters.Add(new DisableCorsAuthorizationFilter()); 66actionModel.Filters.Add(new CorsAuthorizationFilterFactory(enableCors.PolicyName)); 72actionModel.Filters.Add(new DisableCorsAuthorizationFilter());
Microsoft.AspNetCore.Mvc.Cors.Test (2)
CorsApplicationModelProviderTest.cs (1)
141context.Result.Filters.Add(
CorsAuthorizationFilterTest.cs (1)
270target.Add(item);
Microsoft.AspNetCore.Mvc.DataAnnotations (6)
DataAnnotationsClientModelValidatorProvider.cs (1)
92context.Results.Add(new ClientValidatorItem
DataAnnotationsMetadataProvider.cs (1)
386context.ValidationMetadata.ValidatorMetadata.Add(attribute);
DataAnnotationsModelValidatorProvider.cs (1)
89context.Results.Add(new ValidatorItem
DependencyInjection\MvcDataAnnotationsMvcOptionsSetup.cs (2)
44options.ModelMetadataDetailsProviders.Add(new DataAnnotationsMetadataProvider( 49options.ModelValidatorProviders.Add(new DataAnnotationsModelValidatorProvider(
NumericClientModelValidatorProvider.cs (1)
39results.Add(new ClientValidatorItem
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (5)
DataAnnotationsClientModelValidatorProviderTest.cs (1)
57items.Add(expectedValidatorItem);
DataAnnotationsMetadataProviderTest.cs (2)
1548context.ValidationMetadata.ValidatorMetadata.Add(attribute); 1569context.ValidationMetadata.ValidatorMetadata.Add(attribute);
DataTypeClientModelValidatorProviderTest.cs (1)
48items.Add(expectedValidatorItem);
ValidatableObjectAdapterTest.cs (1)
150model.ValidationResults.Add(result);
Microsoft.AspNetCore.Mvc.Formatters.Xml (17)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetup.cs (5)
37options.ModelMetadataDetailsProviders.Add(new DataMemberRequiredBindingMetadataProvider()); 40inputFormatter.WrapperProviderFactories.Add(new ProblemDetailsWrapperProviderFactory()); 44outputFormatter.WrapperProviderFactories.Add(new ProblemDetailsWrapperProviderFactory()); 57options.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider("System.Xml.Linq.XObject")); 58options.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider("System.Xml.XmlNode"));
DependencyInjection\XmlSerializerMvcOptionsSetup.cs (2)
46inputFormatter.WrapperProviderFactories.Add(new ProblemDetailsWrapperProviderFactory()); 50outputFormatter.WrapperProviderFactories.Add(new ProblemDetailsWrapperProviderFactory());
XmlDataContractSerializerInputFormatter.cs (2)
34SupportedEncodings.Add(UTF8EncodingWithoutBOM); 35SupportedEncodings.Add(UTF16EncodingLittleEndian);
XmlDataContractSerializerOutputFormatter.cs (3)
68SupportedEncodings.Add(Encoding.UTF8); 69SupportedEncodings.Add(Encoding.Unicode); 83WrapperProviderFactories.Add(new EnumerableWrapperProviderFactory(WrapperProviderFactories));
XmlSerializerInputFormatter.cs (2)
33SupportedEncodings.Add(UTF8EncodingWithoutBOM); 34SupportedEncodings.Add(UTF16EncodingLittleEndian);
XmlSerializerOutputFormatter.cs (3)
67SupportedEncodings.Add(Encoding.UTF8); 68SupportedEncodings.Add(Encoding.Unicode); 80WrapperProviderFactories.Add(new EnumerableWrapperProviderFactory(WrapperProviderFactories));
Microsoft.AspNetCore.Mvc.FunctionalTests (10)
AntiforgeryMiddlewareTest.cs (1)
273partManager.FeatureProviders.Add(new TestControllerFeatureProvider());
ErrorPageTests.cs (2)
77options.AdditionalReferencePaths.Add(typeof(string).Assembly.Location); 83options.AdditionalReferencePaths.Add(path);
RazorBuildTest.cs (1)
28options.AdditionalReferencePaths.Add(path);
RazorRuntimeCompilationHostingStartupTest.cs (1)
27options.AdditionalReferencePaths.Add(path);
TestingInfrastructureInheritanceTests.cs (5)
22.WithWebHostBuilder(builder => factory.ConfigureWebHostCalled.Add("Customization")) 23.WithWebHostBuilder(builder => factory.ConfigureWebHostCalled.Add("FurtherCustomization")); 42.WithWebHostBuilder(builder => factory.ConfigureWebHostCalled.Add("Customization")) 43.WithWebHostBuilder(builder => factory.ConfigureWebHostCalled.Add("FurtherCustomization")); 134ConfigureWebHostCalled.Add("ConfigureWebHost");
Microsoft.AspNetCore.Mvc.IntegrationTests (20)
ActionParametersIntegrationTest.cs (1)
465options.ModelBinderProviders.Add(new ComplexTypeModelBinderProvider());
AuthorizeFilterIntegrationTest.cs (6)
103authorizationFilterContext.Filters.Add(authorizeFilter); 106authorizationFilterContext.Filters.Add(secondFilter); 109authorizationFilterContext.Filters.Add(thirdFilter); 139authorizationFilterContext.Filters.Add(authorizeFilter); 142authorizationFilterContext.Filters.Add(secondFilter); 145authorizationFilterContext.Filters.Add(thirdFilter);
ComplexTypeModelBinderIntegrationTest.cs (1)
25options.ModelBinderProviders.Add(new ComplexTypeModelBinderProvider());
DictionaryModelBinderIntegrationTest.cs (8)
376options => options.ValueProviderFactories.Add(new JQueryQueryStringValueProviderFactory())); 548options => options.ValueProviderFactories.Add(new JQueryQueryStringValueProviderFactory())); 621options => options.ValueProviderFactories.Add(new JQueryQueryStringValueProviderFactory())); 742options => options.ValueProviderFactories.Add(new JQueryQueryStringValueProviderFactory())); 945options => options.ValueProviderFactories.Add(new JQueryQueryStringValueProviderFactory())); 1018options => options.ValueProviderFactories.Add(new JQueryQueryStringValueProviderFactory())); 1567_data.Add(item); 1672_data.Add(item);
HasValidatorsValidationMetadataProviderIntegrationTest.cs (1)
38mvcOptions.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(IQueryable)));
JQueryFormatModelBindingIntegrationTest.cs (1)
32options.ValueProviderFactories.Add(new JQueryQueryStringValueProviderFactory());
ValidationIntegrationTests.cs (1)
1742options.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Address)));
ValidationWithRecordIntegrationTests.cs (1)
1545options.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Address)));
Microsoft.AspNetCore.Mvc.Localization (1)
MvcLocalizationServices.cs (1)
38options.ViewLocationExpanders.Add(new LanguageViewLocationExpander(format));
Microsoft.AspNetCore.Mvc.NewtonsoftJson (6)
DependencyInjection\NewtonsoftJsonMvcOptionsSetup.cs (2)
73options.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(IJsonPatchDocument))); 74options.ModelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(JToken)));
NewtonsoftJsonInputFormatter.cs (2)
63SupportedEncodings.Add(UTF8EncodingWithoutBOM); 64SupportedEncodings.Add(UTF16EncodingLittleEndian);
NewtonsoftJsonOutputFormatter.cs (2)
69SupportedEncodings.Add(Encoding.UTF8); 70SupportedEncodings.Add(Encoding.Unicode);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (7)
JsonPatchOperationsArrayProviderTests.cs (3)
31apiDescription.ParameterDescriptions.Add(jsonPatchParameterDescription); 32apiDescription.ParameterDescriptions.Add(stringParameterDescription); 36apiDescriptionProviderContext.Results.Add(apiDescription);
NewtonsoftJsonInputFormatterTest.cs (3)
347_serializerSettings.Converters.Add(new IsoDateTimeConverter()); 378_serializerSettings.Converters.Add(new IsoDateTimeConverter()); 409_serializerSettings.Converters.Add(new IsoDateTimeConverter());
src\Mvc\Mvc.Core\test\Formatters\JsonOutputFormatterTestBase.cs (1)
209formatter.SupportedEncodings.Add(encoding);
Microsoft.AspNetCore.Mvc.Razor (10)
ApplicationParts\RazorCompiledItemFeatureProvider.cs (1)
47feature.ViewDescriptors.Add(descriptor);
DependencyInjection\MvcRazorMvcCoreBuilderExtensions.cs (2)
68partManager.FeatureProviders.Add(new TagHelperFeatureProvider()); 73partManager.FeatureProviders.Add(new RazorCompiledItemFeatureProvider());
DependencyInjection\MvcRazorMvcViewOptionsSetup.cs (1)
36options.ViewEngines.Add(_razorViewEngine);
RazorViewEngineOptionsSetup.cs (5)
14options.ViewLocationFormats.Add("/Views/{1}/{0}" + RazorViewEngine.ViewExtension); 15options.ViewLocationFormats.Add("/Views/Shared/{0}" + RazorViewEngine.ViewExtension); 17options.AreaViewLocationFormats.Add("/Areas/{2}/Views/{1}/{0}" + RazorViewEngine.ViewExtension); 18options.AreaViewLocationFormats.Add("/Areas/{2}/Views/Shared/{0}" + RazorViewEngine.ViewExtension); 19options.AreaViewLocationFormats.Add("/Views/Shared/{0}" + RazorViewEngine.ViewExtension);
TagHelpers\TagHelperFeatureProvider.cs (1)
27feature.TagHelpers.Add(typeInfo);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (12)
DependencyInjection\MvcRazorRuntimeCompilationOptionsSetup.cs (1)
22options.FileProviders.Add(_hostingEnvironment.ContentRootFileProvider);
DependencyInjection\RazorRuntimeCompilationMvcCoreBuilderExtensions.cs (4)
104builder.Features.Add(new LazyMetadataReferenceFeature(referenceManager)); 105builder.Features.Add(new CompilationTagHelperFeature()); 108builder.Features.Add(new DefaultTagHelperDescriptorProvider()); 109builder.Features.Add(new ViewComponentTagHelperDescriptorProvider());
PageDirectiveFeature.cs (1)
29builder.Features.Add(new PageDirectiveParserOptionsFeature());
RazorProjectPageRouteModelProvider.cs (2)
75context.RouteModels.Add(routeModel); 101context.RouteModels.Add(routeModel);
RuntimeViewCompiler.cs (2)
141cacheEntryOptions.ExpirationTokens.Add(item.ExpirationTokens[i]); 306expirationTokens.Add(_fileProvider.Watch(file.FilePath));
src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (2)
61model.Selectors.Add(selectorModel); 75model.Selectors.Add(CreateSelectorModel(parentDirectoryPath, routeTemplate));
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (3)
RazorReferenceManagerTest.cs (2)
20options.AdditionalReferencePaths.Add(additionalReferencePath); 45applicationPartManager.ApplicationParts.Add(part.Object);
RuntimeViewCompilerTest.cs (1)
852applicationPartManager.ApplicationParts.Add(new AssemblyPart(assembly));
Microsoft.AspNetCore.Mvc.Razor.Test (15)
Compilation\DefaultViewCompilerTest.cs (2)
141manager.FeatureProviders.Add(featureProvider); 155feature.ViewDescriptors.Add(item);
DependencyInjection\MvcRazorMvcBuilderExtensionsTest.cs (3)
20manager.ApplicationParts.Add(new TestApplicationPart()); 39manager.ApplicationParts.Add(new TestApplicationPart( 43manager.FeatureProviders.Add(new TagHelperFeatureProvider());
DependencyInjection\MvcRazorMvcCoreBuilderExtensionsTest.cs (4)
61manager.ApplicationParts.Add(new TestApplicationPart()); 79manager.ApplicationParts.Add(new TestApplicationPart( 83manager.FeatureProviders.Add(new TestFeatureProvider()); 121feature.TagHelpers.Add(type);
RazorViewEngineTest.cs (6)
2070options.PageViewLocationFormats.Add("/Views/Shared/{0}.cshtml"); 2071options.PageViewLocationFormats.Add("/Pages/Shared/{0}.cshtml"); 2077options.ViewLocationExpanders.Add(expander); 2087options.ViewLocationFormats.Add(location); 2097options.AreaViewLocationFormats.Add(location); 2107options.PageViewLocationFormats.Add(location);
Microsoft.AspNetCore.Mvc.RazorPages (58)
ApplicationModels\AuthorizationPageApplicationModelProvider.cs (2)
42pageModel.Filters.Add(AuthorizationApplicationModelProvider.GetFilter(_policyProvider, authorizeData)); 46pageModel.Filters.Add(new AllowAnonymousFilter());
ApplicationModels\AutoValidateAntiforgeryPageApplicationModelProvider.cs (1)
32pageApplicationModel.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
ApplicationModels\CompiledPageRouteModelProvider.cs (1)
115context.RouteModels.Add(routeModel);
ApplicationModels\DefaultPageApplicationModelPartsProvider.cs (1)
64handlerModel.Parameters.Add(parameterModel);
ApplicationModels\DefaultPageApplicationModelProvider.cs (6)
134pageModel.HandlerProperties.Add(propertyModel); 149pageModel.HandlerMethods.Add(handler); 160pageModel.Filters.Add(filter); 167pageModel.Filters.Add(_pageHandlerPageFilter); 173pageModel.Filters.Add(_pageHandlerResultFilter); 176pageModel.Filters.Add(_handleOptionsRequestsFilter);
ApplicationModels\PageRouteModelFactory.cs (2)
61model.Selectors.Add(selectorModel); 75model.Selectors.Add(CreateSelectorModel(parentDirectoryPath, routeTemplate));
ApplicationModels\ResponseCacheFilterApplicationModelProvider.cs (1)
36context.PageApplicationModel.Filters.Add(new PageResponseCacheFilter(cacheProfile, _loggerFactory));
ApplicationModels\TempDataFilterPageApplicationModelProvider.cs (1)
40pageApplicationModel.Filters.Add(filter);
ApplicationModels\ViewDataAttributePageApplicationModelProvider.cs (1)
34context.PageApplicationModel.Filters.Add(filter);
Builder\RazorPagesEndpointRouteBuilderExtensions.cs (8)
78b.Metadata.Add(CreateDynamicPageMetadata(page, area: null)); 79b.Metadata.Add(new PageEndpointDataSourceIdMetadata(pageDataSource.DataSourceId)); 136b.Metadata.Add(CreateDynamicPageMetadata(page, area: null)); 137b.Metadata.Add(new PageEndpointDataSourceIdMetadata(pageDataSource.DataSourceId)); 190b.Metadata.Add(CreateDynamicPageMetadata(page, area)); 191b.Metadata.Add(new PageEndpointDataSourceIdMetadata(pageDataSource.DataSourceId)); 250b.Metadata.Add(CreateDynamicPageMetadata(page, area)); 251b.Metadata.Add(new PageEndpointDataSourceIdMetadata(pageDataSource.DataSourceId));
DependencyInjection\PageConventionCollectionExtensions.cs (19)
30return conventions.AddFolderApplicationModelConvention("/", model => model.Filters.Add(factory(model))); 44conventions.AddFolderApplicationModelConvention("/", model => model.Filters.Add(filter)); 80model.EndpointMetadata.Add(new AllowAnonymousAttribute()); 84model.Filters.Add(new AllowAnonymousFilter()); 116model.EndpointMetadata.Add(new AllowAnonymousAttribute()); 120model.Filters.Add(new AllowAnonymousFilter()); 141model.EndpointMetadata.Add(new AllowAnonymousAttribute()); 145model.Filters.Add(new AllowAnonymousFilter()); 177model.EndpointMetadata.Add(new AllowAnonymousAttribute()); 181model.Filters.Add(new AllowAnonymousFilter()); 203model.EndpointMetadata.Add(new AuthorizeAttribute(policy)); 207model.Filters.Add(new AuthorizeFilter(policy)); 266model.EndpointMetadata.Add(new AuthorizeAttribute(policy)); 270model.Filters.Add(new AuthorizeFilter(policy)); 292model.EndpointMetadata.Add(new AuthorizeAttribute(policy)); 296model.Filters.Add(new AuthorizeFilter(policy)); 355model.EndpointMetadata.Add(new AuthorizeAttribute(policy)); 359model.Filters.Add(new AuthorizeFilter(policy)); 432model.Selectors.Add(new SelectorModel
DependencyInjection\RazorPagesRazorViewEngineOptionsSetup.cs (11)
28options.PageViewLocationFormats.Add(defaultPageSearchPath); 32options.PageViewLocationFormats.Add(pagesSharedDirectory); 34options.PageViewLocationFormats.Add("/Views/Shared/{0}" + RazorViewEngine.ViewExtension); 46options.AreaPageViewLocationFormats.Add(areaSearchPath); 49options.AreaPageViewLocationFormats.Add(areaPagesSharedSearchPath); 52options.AreaPageViewLocationFormats.Add(areaViewsSharedSearchPath); 54options.AreaPageViewLocationFormats.Add(pagesSharedDirectory); 55options.AreaPageViewLocationFormats.Add("/Views/Shared/{0}" + RazorViewEngine.ViewExtension); 57options.ViewLocationFormats.Add(pagesSharedDirectory); 58options.AreaViewLocationFormats.Add(pagesSharedDirectory); 60options.ViewLocationExpanders.Add(new PageViewLocationExpander());
Infrastructure\CompiledPageActionDescriptorProvider.cs (1)
77context.Results.Add(compiledPageActionDescriptor);
Infrastructure\PageActionDescriptorProvider.cs (1)
123actions.Add(descriptor);
Infrastructure\PageActionEndpointDataSource.cs (2)
90b.Metadata.Add(new DynamicPageRouteValueTransformerMetadata(transformerType, state)); 91b.Metadata.Add(new PageEndpointDataSourceIdMetadata(DataSourceId));
Microsoft.AspNetCore.Mvc.RazorPages.Test (26)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (2)
415pageApplicationModel.EndpointMetadata.Add(metadata5); 416pageApplicationModel.EndpointMetadata.Add(metadata6);
ApplicationModels\CompiledPageRouteModelProviderTest.cs (1)
506feature.ViewDescriptors.Add(descriptor);
Infrastructure\CompiledPageActionDescriptorFactoryTest.cs (15)
85applicationModel.HandlerMethods.Add(handlerModel); 111applicationModel.HandlerMethods.Add(handlerModel); 143applicationModel.HandlerMethods.Add(handlerModel); 173applicationModel.HandlerMethods.Add(handlerModel); 174handlerModel.Parameters.Add(parameterModel); 203applicationModel.HandlerMethods.Add(handlerModel); 204handlerModel.Parameters.Add(parameterModel); 238applicationModel.HandlerMethods.Add(handlerModel); 239handlerModel.Parameters.Add(parameterModel); 272applicationModel.HandlerMethods.Add(handlerModel); 273applicationModel.HandlerProperties.Add(propertyModel); 274handlerModel.Parameters.Add(parameterModel); 303applicationModel.HandlerMethods.Add(handlerModel); 304applicationModel.HandlerProperties.Add(propertyModel); 336applicationModel.HandlerProperties.Add(propertyModel);
Infrastructure\PageActionDescriptorProviderTest.cs (1)
393context.RouteModels.Add(model);
Infrastructure\PageActionEndpointDataSourceTest.cs (2)
140b => b.Metadata.Add(new GroupMetadata()), 141b => b.Metadata.Add("group")
Infrastructure\PageActionInvokerTest.cs (3)
94resourceExecutingContext.ValueProviderFactories.Add(valueProviderFactory2); 1458actionDescriptor.HandlerMethods.Add(new HandlerMethodDescriptor() 1467actionDescriptor.HandlerMethods.Add(new HandlerMethodDescriptor()
Infrastructure\PageBinderFactoryTest.cs (2)
737pageContext.ValueProviderFactories.Add(valueProviderFactory.Object); 830Descriptors.Add(parameter);
Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests (4)
RouteDataTest.cs (4)
29original.Routers.Add(Mock.Of<IRouter>()); 108routeData.Routers.Add(Mock.Of<IRouter>()); 129original.Routers.Add(Mock.Of<IRouter>()); 141routeData.Routers.Add(Mock.Of<IRouter>());
Microsoft.AspNetCore.Mvc.TagHelpers (1)
InputTagHelper.cs (1)
357ViewContext.FormContext.EndOfFormContent.Add(hiddenForCheckboxTag);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (2)
RenderAtEndOfFormTagHelperTest.cs (2)
55viewContext.FormContext.EndOfFormContent.Add(item); 98viewContext.FormContext.EndOfFormContent.Add(item);
Microsoft.AspNetCore.Mvc.Test (3)
MvcServiceCollectionExtensionsTest.cs (2)
65services.Add(ServiceDescriptor.Transient(serviceType.Key, mockType)); 149services.Add(ServiceDescriptor.Transient(serviceType, mockType));
Routing\ActionConstraintMatcherPolicyTest.cs (1)
447c.Results.Add(actions[i]);
Microsoft.AspNetCore.Mvc.ViewFeatures (10)
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensions.cs (1)
66manager.FeatureProviders.Add(new ViewComponentFeatureProvider());
Filters\TempDataApplicationModelProvider.cs (1)
43controllerModel.Filters.Add(filter);
Filters\ViewDataAttributeApplicationModelProvider.cs (1)
35controllerModel.Filters.Add(filter);
HtmlHelper.cs (3)
754ViewContext.FormContext.EndOfFormContent.Add(hiddenForCheckbox); 920ViewContext.FormContext.EndOfFormContent.Add(_htmlGenerator.GenerateAntiforgery(ViewContext)); 976ViewContext.FormContext.EndOfFormContent.Add(_htmlGenerator.GenerateAntiforgery(ViewContext));
Rendering\MultiSelectList.cs (1)
242_groups.Add(group);
TempDataDictionary.cs (1)
252((ICollection<KeyValuePair<string, object?>>)_data).Add(keyValuePair);
ViewComponents\ViewComponentFeatureProvider.cs (1)
24feature.ViewComponents.Add(type);
ViewDataDictionary.cs (1)
556_data.Add(item);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (48)
Buffers\PagedBufferedTextWriterTest.cs (2)
334Returned.Add(buffer); 349Returned.Add(buffer);
DependencyInjection\MvcViewFeaturesMvcBuilderExtensionsTest.cs (3)
130manager.ApplicationParts.Add(new TestApplicationPart( 134manager.FeatureProviders.Add(new TestProvider()); 183feature.ViewComponents.Add(type);
Filters\AntiforgeryApplicationModelProviderTest.cs (1)
170controllerModel.Actions.Add(actionModel);
PartialViewResultExecutorTest.cs (1)
359options.Value.ViewEngines.Add(viewEngine.Object);
Rendering\HtmlHelperFormTest.cs (1)
353htmlHelper.ViewContext.FormContext.EndOfFormContent.Add(tagBuilder);
ViewComponents\DefaultViewComponentDescriptorProviderTest.cs (3)
171manager.ApplicationParts.Add(new TestApplicationPart(types)); 172manager.FeatureProviders.Add(new TestFeatureProvider()); 182feature.ViewComponents.Add(type);
ViewComponents\DefaultViewComponentHelperTest.cs (3)
192manager.ApplicationParts.Add(new TestApplicationPart(types)); 193manager.FeatureProviders.Add(new TestFeatureProvider()); 203feature.ViewComponents.Add(type);
ViewComponents\DefaultViewComponentSelectorTest.cs (3)
253manager.ApplicationParts.Add(new TestApplicationPart(types)); 254manager.FeatureProviders.Add(new TestFeatureProvider()); 264feature.ViewComponents.Add(type);
ViewComponents\ViewComponentFeatureProviderTest.cs (4)
18manager.ApplicationParts.Add(new TestPart(typeof(ConventionsViewComponent))); 19manager.FeatureProviders.Add(new ViewComponentFeatureProvider()); 35manager.ApplicationParts.Add(new TestPart(typeof(AttributeViewComponent))); 36manager.FeatureProviders.Add(new ViewComponentFeatureProvider());
ViewEngines\CompositeViewEngineTest.cs (26)
21optionsAccessor.Value.ViewEngines.Add(viewEngine1); 22optionsAccessor.Value.ViewEngines.Add(viewEngine2); 59optionsAccessor.Value.ViewEngines.Add(engine.Object); 81optionsAccessor.Value.ViewEngines.Add(engine.Object); 113optionsAccessor.Value.ViewEngines.Add(engine1.Object); 114optionsAccessor.Value.ViewEngines.Add(engine2.Object); 115optionsAccessor.Value.ViewEngines.Add(engine3.Object); 146optionsAccessor.Value.ViewEngines.Add(engine1.Object); 147optionsAccessor.Value.ViewEngines.Add(engine2.Object); 148optionsAccessor.Value.ViewEngines.Add(engine3.Object); 191optionsAccessor.Value.ViewEngines.Add(engine.Object); 216optionsAccessor.Value.ViewEngines.Add(engine.Object); 251optionsAccessor.Value.ViewEngines.Add(engine1.Object); 252optionsAccessor.Value.ViewEngines.Add(engine2.Object); 253optionsAccessor.Value.ViewEngines.Add(engine3.Object); 287optionsAccessor.Value.ViewEngines.Add(engine1.Object); 288optionsAccessor.Value.ViewEngines.Add(engine2.Object); 289optionsAccessor.Value.ViewEngines.Add(engine3.Object); 326optionsAccessor.Value.ViewEngines.Add(engine.Object); 348optionsAccessor.Value.ViewEngines.Add(engine.Object); 380optionsAccessor.Value.ViewEngines.Add(engine1.Object); 381optionsAccessor.Value.ViewEngines.Add(engine2.Object); 382optionsAccessor.Value.ViewEngines.Add(engine3.Object); 413optionsAccessor.Value.ViewEngines.Add(engine1.Object); 414optionsAccessor.Value.ViewEngines.Add(engine2.Object); 415optionsAccessor.Value.ViewEngines.Add(engine3.Object);
ViewResultExecutorTest.cs (1)
349options.Value.ViewEngines.Add(viewEngine.Object);
Microsoft.AspNetCore.Mvc.Views.TestCommon (2)
TestViewBufferScope.cs (2)
17CreatedBuffers.Add(buffer); 23ReturnedBuffers.Add(segment);
Microsoft.AspNetCore.OpenApi (5)
Extensions\OpenApiEndpointConventionBuilderExtensions.cs (2)
73endpointBuilder.Metadata.Add(configuredOperation); 112routeEndpointBuilder.Metadata.Add(newOperation);
Services\OpenApiDocumentService.cs (3)
326schema.AllOf.Add(new OpenApiSchema 352schema.AllOf.Add(new OpenApiSchema 384schema.AllOf.Add(propertySchema);
Microsoft.AspNetCore.OpenApi.Tests (2)
Services\OpenApiDocumentServiceTestsBase.cs (2)
174action.BoundProperties.Add(new ParameterDescriptor() 201action.Parameters.Add(new ControllerParameterDescriptor()
Microsoft.AspNetCore.OutputCaching (4)
Policies\OutputCacheConventionBuilderExtensions.cs (4)
25endpointBuilder.Metadata.Add(DefaultPolicy.Instance); 41endpointBuilder.Metadata.Add(policy); 71endpointBuilder.Metadata.Add(outputCachePolicyBuilder.Build()); 88endpointBuilder.Metadata.Add(policy);
Microsoft.AspNetCore.Owin (2)
DictionaryStringArrayWrapper.cs (1)
40void ICollection<KeyValuePair<string, string[]>>.Add(KeyValuePair<string, string[]> item) => Inner.Add(Convert(item));
DictionaryStringValuesWrapper.cs (1)
85void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) => Inner.Add(Convert(item));
Microsoft.AspNetCore.RateLimiting (3)
RateLimiterEndpointConventionBuilderExtensions.cs (3)
26endpointBuilder.Metadata.Add(new EnableRateLimitingAttribute(policyName)); 45endpointBuilder.Metadata.Add(new EnableRateLimitingAttribute(new DefaultRateLimiterPolicy(RateLimiterOptions.ConvertPartitioner<TPartitionKey>(null, policy.GetPartition), policy.OnRejected))); 62endpointBuilder.Metadata.Add(DisableRateLimitingAttribute.Instance);
Microsoft.AspNetCore.RateLimiting.Tests (3)
RateLimitingMetricsTests.cs (2)
197routeEndpointBuilder.Metadata.Add(new EnableRateLimitingAttribute("concurrencyPolicy")); 272routeEndpointBuilder.Metadata.Add(new EnableRateLimitingAttribute("concurrencyPolicy"));
TestEndpointBuilder.cs (1)
28Conventions.Add(convention);
Microsoft.AspNetCore.Razor (2)
TagHelpers\TagHelperAttributeList.cs (2)
132Items.Add(attribute); 140Items.Add(attribute);
Microsoft.AspNetCore.Razor.Runtime (2)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
121WriteDictionary.Add(item);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (1)
138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item);
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Runtime\TagHelpers\TagHelperRunnerTest.cs (1)
261ProcessOrderTracker.Add(Order);
Microsoft.AspNetCore.RequestDecompression.Tests (6)
RequestDecompressionMiddlewareTests.cs (6)
241request.Content.Headers.ContentEncoding.Add(contentEncoding); 312request.Content.Headers.ContentEncoding.Add(contentEncoding); 388request.Content.Headers.ContentEncoding.Add(contentEncoding); 490request.Content.Headers.ContentEncoding.Add(contentEncoding); 574request.Content.Headers.ContentEncoding.Add(contentEncoding); 730request.Content.Headers.ContentEncoding.Add(encoding);
Microsoft.AspNetCore.Rewrite (29)
ApacheModRewrite\RuleBuilder.cs (6)
155_conditions.Add(condition); 180_actions.Add(action); 190_actions.Add(new ForbiddenAction()); 194_actions.Add(new GoneAction()); 214_actions.Add(new RedirectAction(responseStatusCode, pattern, queryStringAppend, queryStringDelete, escapeBackReference)); 220_actions.Add(new RewriteAction(termination, pattern, queryStringAppend, queryStringDelete, escapeBackReference));
ApacheModRewrite\TestStringParser.cs (3)
119results.Add(ServerVariables.FindServerVariable(rawServerVariable, context)); 133results.Add(new ConditionMatchSegment(parsedIndex)); 167results.Add(new LiteralSegment(literal!));
ApacheModRewriteOptionsExtensions.cs (1)
45options.Rules.Add(rule);
IISUrlRewrite\InputParser.cs (8)
101results.Add(ServerVariables.FindServerVariable(parameter!, context, uriMatchPart, _alwaysUseManagedServerVariables)); 114results.Add(new ToLowerSegment(pattern)); 128results.Add(new UrlDecodeSegment(pattern)); 139results.Add(new UrlEncodeSegment(pattern)); 150results.Add(new RuleMatchSegment(index)); 156results.Add(new ConditionMatchSegment(index)); 164results.Add(new RewriteMapSegment(rewriteMap, pattern)); 224results.Add(new LiteralSegment(literal!));
IISUrlRewrite\UrlRewriteFileParser.cs (1)
53result.Add(builder.Build());
IISUrlRewriteOptionsExtensions.cs (1)
53options.Rules.Add(rule);
RewriteOptionsExtensions.cs (9)
22options.Rules.Add(rule); 34options.Rules.Add(new DelegateRule(applyRule)); 48options.Rules.Add(new RewriteRule(regex, replacement, skipRemainingRules)); 74options.Rules.Add(new RedirectRule(regex, replacement, statusCode)); 116options.Rules.Add(new RedirectToHttpsRule { StatusCode = statusCode, SSLPort = sslPort }); 167options.Rules.Add(new RedirectToWwwRule(statusCode)); 179options.Rules.Add(new RedirectToWwwRule(statusCode, domains)); 230options.Rules.Add(new RedirectToNonWwwRule(statusCode)); 242options.Rules.Add(new RedirectToNonWwwRule(statusCode, domains));
Microsoft.AspNetCore.Routing (26)
Builder\EndpointFilterExtensions.cs (1)
109endpointBuilder.FilterFactories.Add(filterFactory);
Builder\EndpointRouteBuilderExtensions.cs (1)
462endpoints.DataSources.Add(routeEndpointDataSource);
Builder\EndpointRoutingApplicationBuilderExtensions.cs (1)
109routeOptions.Value.EndpointDataSources.Add(dataSource);
Builder\RouteHandlerBuilder.cs (2)
39_conventions.Add(convention); 55_finallyConventions.Add(finalConvention);
Builder\RoutingEndpointConventionBuilderExtensions.cs (2)
32endpointBuilder.Metadata.Add(new HostAttribute(hosts)); 92b.Metadata.Add(item);
CompositeEndpointDataSource.cs (1)
45_dataSources.Add(dataSource);
EndpointDataSource.cs (1)
71routeEndpointBuilder.Metadata.Add(metadata);
MapRouteRouteBuilderExtensions.cs (1)
117routeBuilder.Routes.Add(new Route(
RequestDelegateRouteBuilderExtensions.cs (2)
35builder.Routes.Add(route); 273builder.Routes.Add(route);
Route.cs (1)
94context.RouteData.Routers.Add(_target);
RouteCollection.cs (1)
75context.RouteData.Routers.Add(route);
RouteEndpointBuilder.cs (1)
111metadata.Add(new RouteDiagnosticsMetadata(routePattern.DebuggerToString()));
RouteEndpointDataSource.cs (2)
182builder.Metadata.Add(FallbackMetadata.Instance); 192builder.Metadata.Add(new HttpMethodMetadata(entry.HttpMethods));
RouteGroupBuilder.cs (1)
31_outerEndpointRouteBuilder.DataSources.Add(new GroupEndpointDataSource(this));
RouterMiddleware.cs (1)
44context.RouteData.Routers.Add(_router);
ShortCircuit\RouteShortCircuitEndpointConventionBuilderExtensions.cs (1)
36builder.Add(b => b.Metadata.Add(metadata));
Template\RouteTemplate.cs (3)
35Segments.Add(new TemplateSegment(p)); 47Parameters.Add(part); 76Parameters.Add(part);
Tree\TreeRouteBuilder.cs (2)
165InboundEntries.Add(entry); 228OutboundEntries.Add(entry);
Tree\TreeRouter.cs (1)
212context.RouteData.Routers.Add(entry.Handler);
Microsoft.AspNetCore.Routing.Abstractions (1)
RouteData.cs (1)
163Routers.Add(router);
Microsoft.AspNetCore.Routing.FunctionalTests (2)
RouteHandlerTest.cs (2)
77b.DataSources.Add(testDisposeDataSource); 80((IEndpointRouteBuilder)group).DataSources.Add(testGroupDisposeDataSource);
Microsoft.AspNetCore.Routing.Tests (81)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (1)
94endpoints.DataSources.Add(new DefaultEndpointDataSource(endpoint));
Builder\GroupTest.cs (2)
306((IEndpointRouteBuilder)group).DataSources.Add(new TestCustomEndpintDataSource()); 368((IEndpointRouteBuilder)group).DataSources.Add(dynamicDataSource);
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (4)
470Assert.Throws<InvalidOperationException>(() => endpointBuilder.Finally(b => b.Metadata.Add(new RouteNameMetadata("Foo")))); 554builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.ReturnType }); 566builder.Metadata.Add(new ParameterNameMetadata { Name = parameter.Name ?? string.Empty }); 571builder.Metadata.Add(new CustomEndpointMetadata { Source = MetadataSource.Parameter });
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (7)
500Assert.Throws<InvalidOperationException>(() => endpointBuilder.Finally(b => b.Metadata.Add(new RouteNameMetadata("Foo")))); 1023b.Metadata.Add("added-from-group"); 1027group.MapGet("/endpoint", () => { }).Finally(b => b.Metadata.Add("added-from-endpoint")); 1048b.Metadata.Add("added-from-inner-group"); 1055b.Metadata.Add("added-from-outer-group"); 1060handler.Finally(b => b.Metadata.Add("added-from-endpoint-1")); 1061handler.Finally(b => b.Metadata.Add("added-from-endpoint-2"));
Builder\RoutingBuilderExtensionsTest.cs (1)
110b.Routes.Add(router.Object);
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (4)
184inner.Metadata.Add("found-previous-metadata"); 208inner.Metadata.Add("inner-metadata"); 215inner.Metadata.Add("inner-metadata-2"); 263Conventions.Add(convention);
CompositeEndpointDataSourceTest.cs (6)
293b => b.Metadata.Add(metadata), 337b.Metadata.Add(metadata); 385b => b.Metadata.Add("initial-metadata") 393b.Metadata.Add(metadata); 448b.Metadata.Add(metadata); 455b.Metadata.Add("saw-last-metadata");
Matching\CandidateSetTest.cs (1)
375builder.Metadata.Add(metadata[i]);
RouteEndpointBuilderTest.cs (1)
155builder.FilterFactories.Add((endopintContext, next) =>
RoutingMetricsTests.cs (1)
60routeEndpointBuilder.Metadata.Add(FallbackMetadata.Instance);
Template\TemplateParserTests.cs (53)
17expected.Segments.Add(new TemplateSegment()); 34expected.Segments.Add(new TemplateSegment()); 37expected.Parameters.Add(expected.Segments[0].Parts[0]); 53expected.Segments.Add(new TemplateSegment()); 56expected.Parameters.Add(expected.Segments[0].Parts[0]); 72expected.Segments.Add(new TemplateSegment()); 74expected.Segments.Add(new TemplateSegment()); 76expected.Segments.Add(new TemplateSegment()); 94expected.Segments.Add(new TemplateSegment()); 100expected.Parameters.Add(expected.Segments[0].Parts[0]); 102expected.Segments.Add(new TemplateSegment()); 108expected.Parameters.Add(expected.Segments[1].Parts[0]); 110expected.Segments.Add(new TemplateSegment()); 116expected.Parameters.Add(expected.Segments[2].Parts[0]); 132expected.Segments.Add(new TemplateSegment()); 139expected.Parameters.Add(expected.Segments[0].Parts[1]); 155expected.Segments.Add(new TemplateSegment()); 161expected.Parameters.Add(expected.Segments[0].Parts[0]); 178expected.Segments.Add(new TemplateSegment()); 184expected.Parameters.Add(expected.Segments[0].Parts[0]); 191expected.Parameters.Add(expected.Segments[0].Parts[2]); 207expected.Segments.Add(new TemplateSegment()); 214expected.Parameters.Add(expected.Segments[0].Parts[1]); 231expected.Segments.Add(new TemplateSegment()); 244expected.Parameters.Add(expected.Segments[0].Parts[0]); 245expected.Parameters.Add(expected.Segments[0].Parts[2]); 261expected.Segments.Add(new TemplateSegment()); 274expected.Parameters.Add(expected.Segments[0].Parts[0]); 275expected.Parameters.Add(expected.Segments[0].Parts[2]); 291expected.Segments.Add(new TemplateSegment()); 311expected.Parameters.Add(expected.Segments[0].Parts[0]); 312expected.Parameters.Add(expected.Segments[0].Parts[2]); 313expected.Parameters.Add(expected.Segments[0].Parts[4]); 329expected.Segments.Add(new TemplateSegment()); 349expected.Parameters.Add(expected.Segments[0].Parts[0]); 350expected.Parameters.Add(expected.Segments[0].Parts[2]); 351expected.Parameters.Add(expected.Segments[0].Parts[4]); 367expected.Segments.Add(new TemplateSegment()); 380expected.Parameters.Add(expected.Segments[0].Parts[0]); 381expected.Parameters.Add(expected.Segments[0].Parts[2]); 383expected.Segments.Add(new TemplateSegment()); 389expected.Parameters.Add(expected.Segments[1].Parts[0]); 404expected.Segments.Add(new TemplateSegment()); 411expected.Segments.Add(new TemplateSegment()); 423expected.Parameters.Add(expected.Segments[0].Parts[0]); 424expected.Parameters.Add(expected.Segments[1].Parts[0]); 425expected.Parameters.Add(expected.Segments[1].Parts[2]); 441expected.Segments.Add(new TemplateSegment()); 448expected.Segments.Add(new TemplateSegment()); 455expected.Parameters.Add(expected.Segments[0].Parts[0]); 456expected.Parameters.Add(expected.Segments[1].Parts[1]); 475expected.Segments.Add(new TemplateSegment()); 483expected.Parameters.Add(expected.Segments[0].Parts[0]);
Microsoft.AspNetCore.Server.HttpSys (6)
AuthenticationManager.cs (4)
155challenges.Add("Kerberos"); 159challenges.Add("Negotiate"); 163challenges.Add("NTLM"); 174challenges.Add("Basic");
MessagePump.cs (1)
116_serverAddresses.Addresses.Add(prefix.FullPrefix);
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
171Store.Add(item);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
Listener\ResponseHeaderTests.cs (1)
276((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp);
RequestHeaderTests.cs (1)
91requestHeaders.Add(header);
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
171Store.Add(item);
Microsoft.AspNetCore.Server.IntegrationTesting (13)
Common\DeploymentParameters.cs (2)
87EnvironmentVariables.Add(kvp); 92PublishEnvironmentVariables.Add(kvp);
TestMatrix.cs (11)
43ApplicationTypes.Add(ApplicationType.Portable); 44ApplicationTypes.Add(ApplicationType.Standalone); 59Architectures.Add(RuntimeArchitectures.Current); 62Architectures.Add(RuntimeArchitecture.x86); 75HostingModels.Add(HostingModel.OutOfProcess); 76HostingModels.Add(HostingModel.InProcess); 88Skips.Add(new Tuple<Func<TestVariant, bool>, string>(check, message)); 109ApplicationTypes.Add(ApplicationType.Portable); 114HostingModels.Add(HostingModel.OutOfProcess); 129Architectures.Add(RuntimeArchitectures.Current); 286variants.Add(new TestVariant()
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (11)
IISDeploymentParameterExtensions.cs (11)
18parameters.ServerConfigActionList.Add((config, _) => action(config)); 23parameters.ServerConfigActionList.Add(action); 109parameters.ServerConfigActionList.Add( 128deploymentParameters.WebConfigActionList.Add( 131deploymentParameters.WebConfigActionList.Add( 145deploymentParameters.ServerConfigActionList.Add( 170deploymentParameters.ServerConfigActionList.Add( 192deploymentParameters.ServerConfigActionList.Add( 208parameters.WebConfigActionList.Add( 218parameters.WebConfigActionList.Add( 233parameters.ServerConfigActionList.Add(
Microsoft.AspNetCore.Server.Kestrel.Core (12)
Internal\HttpConnection.cs (2)
121metricsTags.Tags.Add(new KeyValuePair<string, object?>("network.protocol.name", "http")); 122metricsTags.Tags.Add(new KeyValuePair<string, object?>("network.protocol.version", httpVersion));
KestrelConfigurationLoader.cs (5)
119EndpointsToAdd.Add(() => 141EndpointsToAdd.Add(() => 161EndpointsToAdd.Add(() => 186EndpointsToAdd.Add(() => 206EndpointsToAdd.Add(() =>
ListenOptions.cs (1)
225context.Addresses.Add(GetDisplayName());
LocalhostListenOptions.cs (1)
68context.Addresses.Add(GetDisplayName());
Middleware\HttpMultiplexedConnectionMiddleware.cs (1)
47metricsTags.Tags.Add(new KeyValuePair<string, object?>("tls.protocol.version", "1.3"));
Middleware\HttpsConnectionMiddleware.cs (2)
211metricsTags.Tags.Add(new KeyValuePair<string, object?>("tls.protocol.name", protocolName)); 213metricsTags.Tags.Add(new KeyValuePair<string, object?>("tls.protocol.version", protocolVersion));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (11)
Http1\Http1ConnectionTests.cs (1)
1202public void Add(KeyValuePair<string, StringValues> item) => _innerHeaders.Add(item);
HttpResponseHeadersTests.cs (3)
123((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp); 217((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp); 249((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp);
KestrelServerTests.cs (7)
53server.Features.Get<IServerAddressesFeature>().Addresses.Add("http:/asdf"); 69server.Features.Get<IServerAddressesFeature>().Addresses.Add("https://127.0.0.1:0"); 85server.Features.Get<IServerAddressesFeature>().Addresses.Add("https://127.0.0.1:0"); 97server.Features.Get<IServerAddressesFeature>().Addresses.Add("http://127.0.0.1:0"); 111server.Features.Get<IServerAddressesFeature>().Addresses.Add("https://127.0.0.1:0"); 124server.Features.Get<IServerAddressesFeature>().Addresses.Add("http://127.0.0.1:0/base"); 149server.Features.Get<IServerAddressesFeature>().Addresses.Add(ignoredAddress);
Microsoft.AspNetCore.Shared.Tests (5)
AdaptiveCapacityDictionaryTests.cs (1)
447((ICollection<KeyValuePair<string, object?>>)dict).Add(new KeyValuePair<string, object?>("key", "value"));
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
121WriteDictionary.Add(item);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (1)
138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
211((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Add(item);
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
171Store.Add(item);
Microsoft.AspNetCore.SignalR (2)
HubEndpointRouteBuilderExtensions.cs (2)
64e.Metadata.Add(item); 68e.Metadata.Add(new HubMetadata(typeof(THub)));
Microsoft.AspNetCore.SignalR.Core (1)
HubOptionsSetup.cs (1)
78options.SupportedProtocols.Add(protocol);
Microsoft.AspNetCore.SignalR.Tests (5)
HubConnectionHandlerTests.cs (1)
3732policy.Requirements.Add(new DelayRequirement(tcsService));
Internal\TypedClientBuilderTests.cs (3)
350Sends.Add(new SendContext(method, args, cancellationToken, tcs)); 364Sends.Add(new SendContext(method, args, cancellationToken, tcs)); 373Sends.Add(new SendContext(method, args, cancellationToken, tcs));
MapSignalRTests.cs (1)
240options.AuthorizationData.Add(new AuthorizeAttribute());
Microsoft.AspNetCore.StaticAssets (3)
StaticAssetEndpointFactory.cs (2)
34routeEndpointBuilder.Metadata.Add(new ContentEncodingMetadata(selector.Value, double.Parse(selector.Quality, CultureInfo.InvariantCulture))); 49routeEndpointBuilder.Metadata.Add(resource);
StaticAssetsManifest.cs (1)
41endpoints.DataSources.Add(dataSource);
Microsoft.AspNetCore.TestHost.Tests (2)
TestClientTests.cs (2)
680client.SubProtocols.Add("alpha"); 681client.SubProtocols.Add("bravo");
Microsoft.AspNetCore.Tests (11)
WebApplicationTests.cs (11)
242app.Urls.Add("http://localhost:5002"); 243app.Urls.Add("https://localhost:5003"); 262app.Urls.Add("http://localhost:5002"); 263app.Urls.Add("https://localhost:5003"); 2324((IConfigurationBuilder)builder.Configuration).Sources.Add(new RandomConfigurationSource()); 2342((IConfigurationBuilder)builder.Configuration).Sources.Add(configSource); 2356((IConfigurationBuilder)builder.Configuration).Sources.Add(configSource); 2370((IConfigurationBuilder)builder.Configuration).Sources.Add(configSource); 2387((IConfigurationBuilder)builder.Configuration).Sources.Add(new RandomConfigurationSource()); 3117_urls.Add("http://localhost:5000"); 3118_urls.Add("https://localhost:5001");
Microsoft.AspNetCore.WebSockets.ConformanceTests (3)
Autobahn\AutobahnSpec.cs (3)
23Servers.Add(new ServerSpec(name, url)); 31Cases.Add(caseSpec); 40ExcludedCases.Add(caseSpec);
Microsoft.AspNetCore.WebSockets.Tests (3)
AddWebSocketsTests.cs (1)
20o.AllowedOrigins.Add("someString");
WebSocketMiddlewareTests.cs (2)
664o.AllowedOrigins.Add(origin); 701o => o.AllowedOrigins.Add("http://example.com")))
Microsoft.Build (21)
BackEnd\Components\SdkResolution\SdkResolverService.cs (4)
465_generalResolversManifestsRegistry.Add(sdkResolverManifest); 556_generalResolversManifestsRegistry.Add(manifest); 560_specificResolversManifestsRegistry.Add(manifest); 565_generalResolversManifestsRegistry.Add(sdkDefaultResolversManifest);
Definition\Project.cs (3)
4391AllEvaluatedProperties.Add(property); 4403AllEvaluatedItemDefinitionMetadata.Add(itemDefinitionMetadatum); 4415AllEvaluatedItems.Add(item);
Definition\ProjectCollection.cs (1)
1164globalProperties.Add(globalProperty);
Evaluation\Expander.cs (4)
1920result.Add(newItem); 1944result.Add(itemFactory.CreateItem(itemSpec, elementLocation.File)); 1948result.Add(itemSpec.Equals(originalItem.EvaluatedIncludeEscaped) 1955result.Add(null);
Evaluation\ItemSpec.cs (2)
357matches.Add(key); 369matches.Add(kvp.Key);
Evaluation\Preprocessor.cs (1)
126list.Add(importedProject);
Instance\ProjectInstance.cs (2)
1602_itemDefinitions.Add(itemDefinitionInstance); 3203_itemDefinitions.Add(new ProjectItemDefinitionInstance(definition));
Instance\ProjectTargetInstance.cs (1)
517_children.Add(projectTargetInstanceChild);
Logging\BinaryLogger\BuildEventArgsReader.cs (2)
1486list.Add(new DictionaryEntry(itemType, item)); 1513list.Add(new DictionaryEntry(itemType, item));
WindowsFileSystem.cs (1)
157result.Add(Path.Combine(directoryPath, findResult.CFileName));
Microsoft.Build.Engine.OM.UnitTests (1)
WindowsFileSystem.cs (1)
157result.Add(Path.Combine(directoryPath, findResult.CFileName));
Microsoft.Build.Engine.UnitTests (19)
BackEnd\BatchingEngine_Tests.cs (10)
36items.Add(new ProjectItemInstance(project, "File", "a.foo", project.FullPath)); 37items.Add(new ProjectItemInstance(project, "File", "b.foo", project.FullPath)); 38items.Add(new ProjectItemInstance(project, "File", "c.foo", project.FullPath)); 39items.Add(new ProjectItemInstance(project, "File", "d.foo", project.FullPath)); 40items.Add(new ProjectItemInstance(project, "File", "e.foo", project.FullPath)); 44items.Add(new ProjectItemInstance(project, "Doc", "a.doc", project.FullPath)); 45items.Add(new ProjectItemInstance(project, "Doc", "b.doc", project.FullPath)); 46items.Add(new ProjectItemInstance(project, "Doc", "c.doc", project.FullPath)); 47items.Add(new ProjectItemInstance(project, "Doc", "d.doc", project.FullPath)); 48items.Add(new ProjectItemInstance(project, "Doc", "e.doc", project.FullPath));
BackEnd\Lookup_Tests.cs (7)
782group.Add(item1); 837group.Add(item1); 877group.Add(item1); 922group.Add(item1); 983group.Add(item1); 1040group.Add(item1); 1052group3.Add(item1b);
Construction\SolutionProjectGenerator_Tests.cs (2)
1560globalProperties.Add(new KeyValuePair<string, string>("Configuration", "Debug")); 1561globalProperties.Add(new KeyValuePair<string, string>("Platform", "Mixed Platforms"));
Microsoft.Build.Framework (2)
BinaryTranslator.cs (2)
350list.Add(value); 376collection.Add(value);
Microsoft.Build.Tasks.Core (2)
MSBuild.cs (1)
548undefinePropertiesPerProject[i].Add(property);
WindowsFileSystem.cs (1)
157result.Add(Path.Combine(directoryPath, findResult.CFileName));
Microsoft.Build.Utilities.Core (6)
ApiContract.cs (1)
57apiContracts.Add(new ApiContract(
PlatformManifest.cs (1)
146DependentPlatforms.Add(new DependentPlatform(childElement.GetAttribute(Attributes.Name), childElement.GetAttribute(Attributes.Version)));
ToolLocationHelper.cs (3)
3946versions.Add("v2.0"); 3953versions.Add(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV30); 3960versions.Add(FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV35);
WindowsFileSystem.cs (1)
157result.Add(Path.Combine(directoryPath, findResult.CFileName));
Microsoft.Cci.Extensions (12)
Experimental\APIClosureTypeReferenceVisitor.cs (2)
64_typeReferences.Add(type); 68_assemblyReferences.Add(asmRef);
Experimental\TypeReferenceSearcher.cs (4)
120_dependencies.Add(new TypeReferenceDependency(type, property.Getter.ResolvedTypeDefinitionMember)); 122_dependencies.Add(new TypeReferenceDependency(type, property.Setter.ResolvedTypeDefinitionMember)); 130_dependencies.Add(new TypeReferenceDependency(type, member)); 139_dependencies.Add(new TypeReferenceDependency(type, typeDef));
Experimental\TypeReferenceVisitor.cs (2)
64_typeReferences.Add(type); 68_assemblyReferences.Add(asmRef);
HostEnvironment.cs (1)
418this.UnresolvedIdentities.Add(unresolved);
TypeDependencies.cs (3)
185_publicDependents.Add(type); 187_dependents.Add(type); 193_methodDependents.Add(method);
Microsoft.DotNet.GenFacades (1)
GenPartialFacadeSourceGenerator.cs (1)
166assemblyListForTypes.Add(assemblyName);
Microsoft.DotNet.Open.Api.Tools.Tests (2)
OpenApiTestBase.cs (2)
93noExtension.Parameters.Add(new NameValueHeaderValue("filename", "filename")); 95extension.Parameters.Add(new NameValueHeaderValue("filename", "filename.json"));
Microsoft.DotNet.SignCheckLibrary (8)
Verification\ArchiveVerifier.cs (1)
70svr.NestedResults.Add(result);
Verification\ExeVerifier.cs (1)
46svr.NestedResults.Add(bundleEntryResult);
Verification\Jar\JarSignatureFile.cs (1)
275Timestamps.Add(new Timestamp
Verification\LzmaVerifier.cs (1)
35svr.NestedResults.Add(VerifyFile(destinationFile, parent, Path.Combine(svr.VirtualPath, destinationFile), containerPath: null));
Verification\MsiVerifier.cs (2)
57svr.NestedResults.Add(packageFileResult); 81svr.NestedResults.Add(binaryStreamResult);
Verification\MspVerifier.cs (1)
29svr.NestedResults.Add(VerifyFile(file, svr.Filename, Path.Combine(svr.VirtualPath, file), containerPath: null));
Verification\MsuVerifier.cs (1)
41svr.NestedResults.Add(cabEntryResult);
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Modeler\ServiceClientModelFactory.cs (1)
165parameters.Add(CreateParameterModel(operation.RequestBody));
Microsoft.Extensions.Caching.Abstractions (4)
CacheEntryExtensions.cs (2)
41entry.ExpirationTokens.Add(expirationToken); 125entry.PostEvictionCallbacks.Add(new PostEvictionCallbackRegistration()
MemoryCacheEntryExtensions.cs (2)
59options.ExpirationTokens.Add(expirationToken); 135options.PostEvictionCallbacks.Add(new PostEvictionCallbackRegistration()
Microsoft.Extensions.Caching.SqlServer (1)
SqlServerCachingServicesExtensions.cs (1)
37services.Add(ServiceDescriptor.Singleton<IDistributedCache, SqlServerCache>());
Microsoft.Extensions.Caching.StackExchangeRedis (1)
StackExchangeRedisCacheServiceCollectionExtensions.cs (1)
32services.Add(ServiceDescriptor.Singleton<IDistributedCache, RedisCacheImpl>());
Microsoft.Extensions.Configuration (1)
ConfigurationManager.cs (1)
299((IDictionary<string, object>)_properties).Add(item);
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
ConfigurationProviderTestBase.cs (1)
362values.Add(new KeyValuePair<string, string>(sectionName + tuple.Key, tuple.Value));
Microsoft.Extensions.DependencyInjection.Abstractions (11)
Extensions\ServiceCollectionDescriptorExtensions.cs (5)
28collection.Add(descriptor); 47collection.Add(descriptor); 77collection.Add(descriptor); 484services.Add(descriptor); 542collection.Add(descriptor);
ServiceCollectionServiceExtensions.cs (3)
461services.Add(serviceDescriptor); 492collection.Add(descriptor); 503collection.Add(descriptor);
ServiceCollectionServiceExtensions.Keyed.cs (3)
510services.Add(serviceDescriptor); 544collection.Add(descriptor); 556collection.Add(descriptor);
Microsoft.Extensions.Diagnostics (2)
Metrics\Configuration\MetricsConfigureOptions.cs (2)
89options.Rules.Add(new InstrumentRule(meterName, instrumentName: null, listenerName, scopes, meterEnabled)); 108options.Rules.Add(new InstrumentRule(meterSection.Key, instrumentName, listenerName, scopes, instrumentEnabled));
Microsoft.Extensions.Diagnostics.Abstractions (1)
Metrics\MetricsBuilderExtensions.Rules.cs (1)
114options.Rules.Add(new InstrumentRule(meterName, instrumentName, listenerName, scopes, enable));
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DependencyInjection\HealthChecksBuilder.cs (1)
25options.Registrations.Add(registration);
Microsoft.Extensions.FileSystemGlobbing (2)
Internal\PatternContexts\PatternContextLinear.cs (1)
57frame.StemItems.Add(directory.Name);
Internal\PatternContexts\PatternContextRagged.cs (1)
79frame.StemItems.Add(directory.Name);
Microsoft.Extensions.Http (21)
DependencyInjection\DefaultHttpClientBuilderServiceCollection.cs (3)
29_services.Add(item); 45_services.Add(item); 55_services.Add(item);
DependencyInjection\HttpClientBuilderExtensions.cs (15)
33builder.Services.Configure<HttpClientFactoryOptions>(builder.Name, options => options.HttpClientActions.Add(configureClient)); 57options.HttpClientActions.Add(client => configureClient(services, client)); 81options.HttpMessageHandlerBuilderActions.Add(b => b.AdditionalHandlers.Add(configureHandler())); 109options.HttpMessageHandlerBuilderActions.Add(b => b.AdditionalHandlers.Add(configureHandler(b.Services))); 136options.HttpMessageHandlerBuilderActions.Add(b => b.AdditionalHandlers.Add(b.Services.GetRequiredService<THandler>())); 160options.HttpMessageHandlerBuilderActions.Add(b => b.PrimaryHandler = configureHandler()); 190options.HttpMessageHandlerBuilderActions.Add(b => b.PrimaryHandler = configureHandler(b.Services)); 218options.HttpMessageHandlerBuilderActions.Add(b => b.PrimaryHandler = b.Services.GetRequiredService<THandler>()); 244options.HttpMessageHandlerBuilderActions.Add(b => configureHandler(b.PrimaryHandler, b.Services)); 263builder.Services.Configure<HttpClientFactoryOptions>(builder.Name, options => options.HttpMessageHandlerBuilderActions.Add(configureBuilder)); 291options.HttpMessageHandlerBuilderActions.Add(b => 647options.HttpMessageHandlerBuilderActions.Add(b => configureAdditionalHandlers(b.AdditionalHandlers, b.Services));
DependencyInjection\HttpClientBuilderExtensions.Logging.cs (1)
64b.AdditionalHandlers.Add(handler);
DependencyInjection\SocketsHttpHandlerBuilderExtensions.cs (1)
32options.HttpMessageHandlerBuilderActions.Add(b =>
Logging\LoggingHttpMessageHandlerBuilderFilter.cs (1)
59builder.AdditionalHandlers.Add(new LoggingHttpMessageHandler(innerLogger, options));
Microsoft.Extensions.Identity.Core (3)
RoleManager.cs (1)
54RoleValidators.Add(v);
UserManager.cs (2)
91UserValidators.Add(v); 98PasswordValidators.Add(v);
Microsoft.Extensions.Logging (2)
FilterLoggingBuilderExtensions.cs (1)
204options.Rules.Add(new LoggerFilterRule(type, category, level, filter));
LoggingBuilderExtensions.cs (1)
24builder.Services.Add(ServiceDescriptor.Singleton<IConfigureOptions<LoggerFilterOptions>>(
Microsoft.Extensions.Logging.AzureAppServices (1)
ConfigurationBasedLevelSwitcher.cs (1)
25options.Rules.Add(new LoggerFilterRule(_provider.FullName, null, GetLogLevel(), null));
Microsoft.Extensions.Logging.Configuration (1)
LoggerFilterConfigureOptions.cs (1)
67options.Rules.Add(newRule);
Microsoft.Extensions.Logging.EventSource (1)
EventLogFiltersConfigureOptions.cs (1)
22options.Rules.Add(rule);
Microsoft.Extensions.Options.SourceGeneration (4)
TypeDeclarationSyntaxReceiver.cs (4)
27TypeDeclarations.Add(classSyntax); 31TypeDeclarations.Add(structSyntax); 35TypeDeclarations.Add(recordSyntax); 39TypeDeclarations.Add(interfaceSyntax);
Microsoft.Interop.SourceGeneration (1)
ValueEqualityImmutableDictionary.cs (1)
60public void Add(KeyValuePair<T, U> item) => ((ICollection<KeyValuePair<T, U>>)Map).Add(item);
Microsoft.Net.Http.Headers (12)
CacheControlHeaderValue.cs (2)
685cc.Extensions.Add(nameValue); // success is always true 756destination.Add(valueString.Subsegment(current, tokenLength));
ContentDispositionHeaderValue.cs (3)
191Parameters.Add(new NameValueHeaderValue(SizeString, sizeString)); 394Parameters.Add(new NameValueHeaderValue(parameter, dateString)); 459Parameters.Add(new NameValueHeaderValue(parameter, processedValue));
HeaderUtilities.cs (1)
43parameters.Add(new NameValueHeaderValue(QualityName, qualityString));
MediaTypeHeaderValue.cs (2)
100Parameters.Add(new NameValueHeaderValue(CharsetString, value)); 174Parameters.Add(new NameValueHeaderValue(BoundaryString, value));
NameValueHeaderValue.cs (1)
412nameValueCollection!.Add(parameter!);
RangeHeaderValue.cs (1)
43Ranges.Add(new RangeItemHeaderValue(from, to));
RangeItemHeaderValue.cs (1)
135rangeCollection!.Add(range!);
SetCookieHeaderValue.cs (1)
662result.Extensions.Add(input.Subsegment(tokenStart, offset - tokenStart));
Microsoft.Net.Http.Headers.Tests (114)
CacheControlHeaderValueTest.cs (46)
46Assert.Throws<ArgumentException>(() => cacheControl.NoCacheHeaders.Add(null)); 47Assert.Throws<FormatException>(() => cacheControl.NoCacheHeaders.Add("invalid PLACEHOLDER")); 48cacheControl.NoCacheHeaders.Add("PLACEHOLDER"); 53Assert.Throws<ArgumentException>(() => cacheControl.PrivateHeaders.Add(null)); 54Assert.Throws<FormatException>(() => cacheControl.PrivateHeaders.Add("invalid PLACEHOLDER")); 55cacheControl.PrivateHeaders.Add("PLACEHOLDER"); 61Assert.Throws<ArgumentNullException>(() => cacheControl.Extensions.Add(null!)); 62cacheControl.Extensions.Add(new NameValueHeaderValue("name", "value")); 97cacheControl.Extensions.Add(new NameValueHeaderValue("custom")); 98cacheControl.Extensions.Add(new NameValueHeaderValue("customName", "customValue")); 102cacheControl.Extensions.Add(new NameValueHeaderValue("custom")); 114cacheControl.NoCacheHeaders.Add("PLACEHOLDER1"); 122cacheControl.PrivateHeaders.Add("PLACEHOLDER2"); 123cacheControl.PrivateHeaders.Add("PLACEHOLDER3"); 217cacheControl1.NoCacheHeaders.Add("PLACEHOLDER2"); 220cacheControl2.NoCacheHeaders.Add("PLACEHOLDER1"); 221cacheControl2.NoCacheHeaders.Add("PLACEHOLDER2"); 225cacheControl1.NoCacheHeaders.Add("PLACEHOLDER1"); 231cacheControl3.PrivateHeaders.Add("PLACEHOLDER2"); 234cacheControl4.Extensions.Add(new NameValueHeaderValue("custom")); 237cacheControl5.Extensions.Add(new NameValueHeaderValue("customN", "customV")); 238cacheControl5.Extensions.Add(new NameValueHeaderValue("custom")); 241cacheControl4.Extensions.Add(new NameValueHeaderValue("customN", "customV")); 341cacheControl1.NoCacheHeaders.Add("PLACEHOLDER2"); 346cacheControl2.NoCacheHeaders.Add("PLACEHOLDER1"); 347cacheControl2.NoCacheHeaders.Add("PLACEHOLDER2"); 351cacheControl1!.NoCacheHeaders.Add("PLACEHOLDER1"); 357cacheControl3.PrivateHeaders.Add("PLACEHOLDER2"); 361cacheControl4.PrivateHeaders.Add("PLACEHOLDER3"); 364cacheControl5.Extensions.Add(new NameValueHeaderValue("custom")); 367cacheControl6.Extensions.Add(new NameValueHeaderValue("customN", "customV")); 368cacheControl6.Extensions.Add(new NameValueHeaderValue("custom")); 371cacheControl5.Extensions.Add(new NameValueHeaderValue("customN", "customV")); 384expected.NoCacheHeaders.Add("PLACEHOLDER1"); 385expected.NoCacheHeaders.Add("PLACEHOLDER2"); 398expected.Extensions.Add(new NameValueHeaderValue("custom")); 404expected.PrivateHeaders.Add("PLACEHOLDER1"); 407expected.Extensions.Add(new NameValueHeaderValue("c", "d")); 408expected.Extensions.Add(new NameValueHeaderValue("a", "b")); 418expected.Extensions.Add(new NameValueHeaderValue("custom", "")); 488expected.NoCacheHeaders.Add("t"); 492expected.Extensions.Add(new NameValueHeaderValue("custom")); 496expected.Extensions.Add(new NameValueHeaderValue("custom", "")); 525expected.NoCacheHeaders.Add("t"); 529expected.Extensions.Add(new NameValueHeaderValue("custom")); 533expected.Extensions.Add(new NameValueHeaderValue("custom", ""));
ContentDispositionHeaderValueTest.cs (18)
59Assert.Throws<ArgumentNullException>(() => contentDisposition.Parameters.Add(null!)); 94contentDisposition.Parameters.Add(name); 114contentDisposition.Parameters.Add(fileName); 164contentDisposition.Parameters.Add(fileName); 186contentDisposition.Parameters.Add(fileNameStar); 270contentDisposition.Parameters.Add(fileNameStar); 311contentDisposition.Parameters.Add(dateParameter); 337contentDisposition.Parameters.Add(dateParameter); 355contentDisposition.Parameters.Add(sizeParameter); 376contentDisposition.Parameters.Add(sizeParameter); 407contentDisposition.Parameters.Add(new NameValueHeaderValue("custom", "\"custom value\"")); 436contentDisposition3.Parameters.Add(new NameValueHeaderValue("name", "value")); 439contentDisposition5.Parameters.Add(new NameValueHeaderValue("NAME", "MYNAME")); 455contentDisposition3.Parameters.Add(new NameValueHeaderValue("name", "value")); 458contentDisposition5.Parameters.Add(new NameValueHeaderValue("NAME", "MYNAME")); 460contentDisposition6.Parameters.Add(new NameValueHeaderValue("NAME", "MYNAME")); 461contentDisposition6.Parameters.Add(new NameValueHeaderValue("custom", "value")); 492expected.Parameters.Add(new NameValueHeaderValue("filename*", "UTF-8''foo-%c3%a4.html"));
MediaTypeHeaderValueTest.cs (23)
123Assert.Throws<ArgumentNullException>(() => mediaType.Parameters.Add(null!)); 156mediaType0.Parameters.Add(new NameValueHeaderValue("name", "value")); 173mediaType0.Parameters.Add(new NameValueHeaderValue("name", "value")); 184Assert.Throws<NotSupportedException>(() => mediaType1.Parameters.Add(new NameValueHeaderValue("name"))); 201mediaType0.Parameters.Add(new NameValueHeaderValue("name", "value")); 252mediaType.Parameters.Add(charset); 287mediaType.Parameters.Add(quality); 307mediaType.Parameters.Add(quality); 335mediaType.Parameters.Add(new NameValueHeaderValue("custom", "\"custom value\"")); 349mediaType3.Parameters.Add(new NameValueHeaderValue("name", "value")); 352mediaType5.Parameters.Add(new NameValueHeaderValue("CHARSET", "UTF-8")); 368mediaType3.Parameters.Add(new NameValueHeaderValue("name", "value")); 371mediaType5.Parameters.Add(new NameValueHeaderValue("CHARSET", "UTF-8")); 373mediaType6.Parameters.Add(new NameValueHeaderValue("CHARSET", "UTF-8")); 374mediaType6.Parameters.Add(new NameValueHeaderValue("custom", "value")); 400expected.Parameters.Add(new NameValueHeaderValue("custom", "value")); 404expected.Parameters.Add(new NameValueHeaderValue("custom")); 408expected.Parameters.Add(new NameValueHeaderValue("custom", "\"x\"")); 412expected.Parameters.Add(new NameValueHeaderValue("custom", "\"x\"")); 419expected.Parameters.Add(new NameValueHeaderValue("name", "")); 423expected.Parameters.Add(new NameValueHeaderValue("name", "value")); 441expected.Parameters.Add(new NameValueHeaderValue("foo", "bar")); 447expected.Parameters.Add(new NameValueHeaderValue("foo", "bar"));
RangeHeaderValueTest.cs (19)
33range.Ranges.Add(new RangeItemHeaderValue(1, 3)); 36range.Ranges.Add(new RangeItemHeaderValue(5, null)); 37range.Ranges.Add(new RangeItemHeaderValue(null, 17)); 50range5.Ranges.Add(new RangeItemHeaderValue(1, 2)); 51range5.Ranges.Add(new RangeItemHeaderValue(3, 4)); 53range6.Ranges.Add(new RangeItemHeaderValue(3, 4)); // reverse order of range5 54range6.Ranges.Add(new RangeItemHeaderValue(1, 2)); 72range5.Ranges.Add(new RangeItemHeaderValue(1, 2)); 73range5.Ranges.Add(new RangeItemHeaderValue(3, 4)); 75range6.Ranges.Add(new RangeItemHeaderValue(3, 4)); // reverse order of range5 76range6.Ranges.Add(new RangeItemHeaderValue(1, 2)); 96expected.Ranges.Add(new RangeItemHeaderValue(null, 5)); 97expected.Ranges.Add(new RangeItemHeaderValue(1, 4)); 102expected.Ranges.Add(new RangeItemHeaderValue(1, 2)); 106expected.Ranges.Add(new RangeItemHeaderValue(1, 2)); 107expected.Ranges.Add(new RangeItemHeaderValue(3, null)); 108expected.Ranges.Add(new RangeItemHeaderValue(null, 4)); 135expected.Ranges.Add(new RangeItemHeaderValue(null, 5)); 136expected.Ranges.Add(new RangeItemHeaderValue(1, 4));
SetCookieHeaderValueTest.cs (8)
25header1.Extensions.Add("extension1"); 26header1.Extensions.Add("extension2=value"); 61header8.Extensions.Add("extension1"); 62header8.Extensions.Add("extension2=value"); 142header1.Extensions.Add("extension1"); 143header1.Extensions.Add("extension2=value"); 190header9.Extensions.Add("extension1"); 191header9.Extensions.Add("extension2=value");
MSBuild (1)
WindowsFileSystem.cs (1)
157result.Add(Path.Combine(directoryPath, findResult.CFileName));
MSBuildTaskHost (2)
BinaryTranslator.cs (2)
350list.Add(value); 376collection.Add(value);
Mvc.RoutingWebSite (3)
StartupForRouteGroupsWithMetadata.cs (3)
24builder.PartManager.FeatureProviders.Add( 27f.Controllers.Add(typeof(ItemsController).GetTypeInfo()); 28f.Controllers.Add(typeof(ConventionalControllerWithMetadata).GetTypeInfo());
PresentationCore (16)
MS\Internal\Media\ParserStreamGeometryContext.cs (1)
554points.Add(point);
MS\Internal\Shaping\TypefaceMap.cs (1)
461_cachedScaledTypefaces.Add(scaledTypeface);
MS\Internal\TextFormatting\FullTextLine.cs (1)
2047boundsList.Add(bounds);
MS\Internal\TextFormatting\LineServicesCallbacks.cs (5)
2700IndexedGlyphRuns.Add( 2782IndexedGlyphRuns.Add( 3125glyphAdvances.Add(textFormatterImp.IdealToReal(piJustifiedGlyphAdvances[i], currentLine.PixelsPerDip)); 3132glyphOffsets.Add(new Point( 3262charWidths.Add(textFormatterImp.IdealToReal(piCharAdvances[i], Draw.CurrentLine.PixelsPerDip));
MS\Internal\TextFormatting\SimpleTextLine.cs (3)
856boundsList.Add( 941displayGlyphAdvances.Add(_settings.Formatter.IdealToReal(run.NominalAdvances[i], PixelsPerDip)); 1783displayGlyphAdvances.Add(_textFormatterImp.IdealToReal(NominalAdvances[i], _pixelsPerDip));
System\Windows\dataobject.cs (1)
1770bitmapEncoder.Frames.Add(BitmapFrame.Create(bitmapSource));
System\Windows\Input\Stylus\Common\StylusDeviceCollection.cs (1)
35Items.Add(stylusDevice.StylusDevice);
System\Windows\Media\Imaging\BitmapEncoder.cs (2)
452_frameHandles.Add(frameEncodeHandle); 723_writeSourceHandles.Add(outSourceHandle);
System\Windows\Media\textformatting\TextCharacters.cs (1)
294shapeables.Add(
PresentationFramework (41)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (4)
136pageEl.Add(new FixedPageProxy(segment.Start.TextContainer.Parent, startPage + i)); 142((FixedPageProxy)pageEl[firstPage]).Segments.Add(new PointSegment(start, end)); 147((FixedPageProxy)pageEl[firstPage]).Segments.Add(new PointSegment(start, PointSegment.NotAPoint)); 148((FixedPageProxy)pageEl[firstPage + numOfPages]).Segments.Add(new PointSegment(PointSegment.NotAPoint, end));
MS\Internal\Annotations\Anchoring\LocatorManager.cs (2)
331attachedAnnotations.Add(new AttachedAnnotation(this, annotation, anchor, attachedAnchor, attachmentLevel)); 943locators.Add(realLocator);
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
129list.Add(((TextPointer)start).Parent); 141list.Add(node);
MS\Internal\Annotations\Component\AnnotationComponentManager.cs (1)
283currentList.Add(component);
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (8)
776res.Add(this); 782res.Add(new HighlightSegment(_segment.Start, ps, _owners)); 783res.Add(new HighlightSegment(ps, _segment.End, _owners)); 811res.Add(new HighlightSegment(_segment.Start, ps1, _owners)); 815res.Add(new HighlightSegment(ps1, ps1, _owners)); 819res.Add(new HighlightSegment(ps1, _segment.End, _owners)); 837res.Add(r2[j]); 846res.Add(r1[i]);
MS\Internal\Annotations\ObservableDictionary.cs (1)
157((ICollection<KeyValuePair<string, string>>)_nameValues).Add(pair);
MS\Internal\Data\DifferencingCollection.cs (1)
228Items.Add(o);
MS\Internal\Globalization\BamlTreeUpdater.cs (3)
586newChildrenList.Add(bamlNode); 645newChildrenList.Add(node); 655newChildrenList.Add(node);
System\Windows\Annotations\AnnotationDocumentPaginator.cs (1)
400attachedAnnotations.Add(new AttachedAnnotation(_locatorManager, annotation, anchor, attachedAnchor, attachmentLevel, firstElement as DocumentPageHost));
System\Windows\Annotations\AnnotationService.cs (2)
994dirtyAnnotations.Add(existingAnnotations[i]); 1014processedElements.Add(parent);
System\Windows\Annotations\Storage\XmlStreamStore.cs (5)
784allNamespaces.Add(name); 798allNamespaces.Add(knownNamespace); 817allNamespaces.Add(name); 835supportedNamespaces.Add(name.ToString()); 844supportedNamespaces.Add(knownNamespace.ToString());
System\Windows\Controls\CustomDictionarySources.cs (1)
230((IList<Uri>)this).Add((Uri)value);
System\Windows\Data\BindingGroup.cs (3)
837newItems.Add(itemReference); 1684list.Add(itemWR); 1893list.Add(itemWR);
System\Windows\Documents\DocumentReferenceCollection.cs (1)
70_InternalList.Add(item);
System\Windows\Documents\DocumentSequence.cs (1)
876_pendingPages.Add(asyncRequest.Page);
System\Windows\Documents\FixedDocument.cs (1)
1203_pendingPages.Add(pc);
System\Windows\Documents\PageContentCollection.cs (1)
63InternalList.Add(newPageContent);
System\Windows\Documents\WpfPayload.cs (1)
470bitmapEncoder.Frames.Add(BitmapFrame.Create(imageSource));
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
78fullTypeName.TypeArguments.Add(new XamlTypeName(typeArg));
System\Windows\PropertyPath.cs (1)
1009items.Add(o);
PresentationFramework-SystemDrawing (1)
SystemDrawingExtension.cs (1)
144bitmapEncoder.Frames.Add(BitmapFrame.Create(bitmapSource));
PresentationUI (21)
MS\Internal\Documents\DigitalSignatureProvider.cs (6)
172DigitalSignatureList.Add(digitalSignature); 207DigitalSignatureList.Add(digitalSignature); 430requestedSignatureList.Add(signatureDefinition); 468signatureList.Add(digitalSignature); 477signatureList.Add(ConvertXpsSignatureDefinition(signatureDefinition)); 484signatureList.Add(ConvertXpsSignatureDefinition(definition));
MS\Internal\Documents\DocumentSignatureManager.cs (1)
564signResourcesList.Add(sigResources);
MS\Internal\Documents\RightsManagementManager.cs (1)
682accountList.Add(accountName);
MS\Internal\Documents\RightsManagementProvider.cs (7)
524grantDictionary[user].Add(grant); 547grantDictionary[owner].Add(ownerGrant); 702licenseGrants.Add(grant); 719licenseGrants.Add(ownerGrant); 723grantList.Add(ownerGrant); 794unsignedPublishLicense.Grants.Add(currentOwnerGrant); 1026_cryptoProviders.Add(cryptoProvider);
MS\Internal\Documents\RMPermissions.cs (6)
106rightsStrings.Add(SR.RMPermissionsOwnerPermission); 112rightsStrings.Add(SR.RMPermissionsViewPermission); 117rightsStrings.Add(SR.RMPermissionsPrintPermission); 122rightsStrings.Add(SR.RMPermissionsCopyPermission); 127rightsStrings.Add(SR.RMPermissionsSignPermission); 132rightsStrings.Add(SR.RMPermissionsAnnotatePermission);
RazorBuildWebSite (2)
Startup.cs (1)
14.AddRazorRuntimeCompilation(options => options.FileProviders.Add(fileProvider));
StartupWithHostingStartup.cs (1)
17mvcBuilder.AddRazorRuntimeCompilation(options => options.FileProviders.Add(fileProvider));
RazorWebSite (3)
Controllers\AddTagHelperComponentController.cs (1)
20_tagHelperComponentManager.Components.Add(new TestBodyTagHelperComponent(0, "Processed TagHelperComponent added from controller."));
Startup.cs (2)
22options.ViewLocationExpanders.Add(new NonMainPageViewLocationExpander()); 23options.ViewLocationExpanders.Add(new BackSlashExpander());
ReachFramework (4)
Serialization\ImageSourceTypeConverter.cs (1)
370encoder.Frames.Add(bitmapFrame);
Serialization\Manager\ReachSerializationUtils.cs (1)
1030LinkTargetList.Add(name);
Serialization\VisualTreeFlattener.cs (2)
153encoder.Frames.Add((BitmapFrame)value); 157encoder.Frames.Add(BitmapFrame.Create((BitmapSource)value));
RoutingSandbox (1)
Framework\FrameworkEndpointRouteBuilderExtensions.cs (1)
18endpoints.DataSources.Add(dataSource);
RoutingWebSite (2)
UseEndpointRoutingStartup.cs (2)
74b.Metadata.Add(new CustomMetadata()); 149endpointBuilder.Metadata.Add(new HostAttribute(hosts));
Sample (1)
Transformers\OperationTransformers.cs (1)
20operation.Parameters.Add(new OpenApiParameter
ServerComparison.FunctionalTests (1)
ResponseCompressionTests.cs (1)
110iisDeploymentParameters.ServerConfigActionList.Add(
SimpleWebSiteWithWebApplicationBuilder (1)
Program.cs (1)
16app.Urls.Add("http://localhost:8080");
SocialSample (8)
Startup.cs (8)
50o.Scope.Add("email"); 51o.Fields.Add("name"); 52o.Fields.Add("email"); 106o.Scope.Add("offline_access"); 188o.Scope.Add("openid"); 189o.Scope.Add("profile"); 190o.Scope.Add("email"); 191o.Scope.Add("offline_access");
System.ComponentModel.Annotations (3)
System\ComponentModel\DataAnnotations\Validator.cs (3)
66validationResults?.Add(err.ValidationResult); 150validationResults?.Add(err.ValidationResult); 199validationResults?.Add(err.ValidationResult);
System.ComponentModel.Composition (2)
Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs (1)
103_collectionOfT.Add((T)item);
System\ComponentModel\Composition\ReflectionModel\ImportingMember.cs (1)
237collection.Add(value);
System.Composition.Hosting (1)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (1)
77ActualMetadata.Add(item);
System.Composition.TypedParts (1)
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (1)
52forKey.Add(export);
System.Net.Http (13)
System\Net\Http\Headers\CacheControlHeaderValue.cs (3)
183NoCacheHeaders.Add(noCacheHeader); 191PrivateHeaders.Add(privateHeader); 472cc.Extensions.Add(nameValue);
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (3)
118Parameters.Add(new NameValueHeaderValue(size, sizeString)); 335Parameters.Add(new NameValueHeaderValue(parameter, dateString)); 401Parameters.Add(new NameValueHeaderValue(parameter, processedValue));
System\Net\Http\Headers\MediaTypeHeaderValue.cs (1)
54Parameters.Add(new NameValueHeaderValue(CharSetName, value));
System\Net\Http\Headers\RangeHeaderValue.cs (2)
38Ranges.Add(new RangeItemHeaderValue(from, to)); 50this.Ranges.Add(new RangeItemHeaderValue(range));
System\Net\Http\Headers\RangeItemHeaderValue.cs (1)
108rangeCollection.Add(range!);
System\Net\Http\HttpRequestOptions.cs (1)
38void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) => ((IDictionary<string, object?>)Options).Add(item);
System\Net\Http\MultipartContent.cs (1)
58contentType.Parameters.Add(new NameValueHeaderValue(nameof(boundary), quotedBoundary));
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (1)
129Headers.ContentEncoding.Add(prevEncoding);
System.Private.DataContractSerialization (8)
System\Runtime\Serialization\DataContractSerializer.cs (1)
133_knownTypeList.Add(knownType);
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (2)
568this.knownTypeList!.Add(itemType); 594this.knownTypeList.Add(knownType);
System\Runtime\Serialization\ReflectionReader.cs (1)
591((ICollection<T>)resultCollection).Add((T)collectionItem!);
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (4)
283extensionData.Members.Add(ReadExtensionDataMember(xmlReader, memberIndex)); 799dataNode.Members.Add(ReadExtensionDataMember(xmlReader, memberIndex++)); 829dataNode.Items.Add(ReadExtensionDataValue(xmlReader)); 889dataNode.Members.Add(member);
System.Security.Cryptography (1)
System\Security\Cryptography\Helpers.cs (1)
22coll.Add(datum);
System.Text.Json (3)
System\Text\Json\Serialization\Converters\Collection\ICollectionOfTConverter.cs (1)
22collection.Add(value);
System\Text\Json\Serialization\Converters\Collection\IListOfTConverter.cs (1)
22collection.Add(value);
System\Text\Json\Serialization\Metadata\JsonPolymorphismOptions.cs (1)
117(options ??= new()).DerivedTypes.Add(new JsonDerivedType(attr.DerivedType, attr.TypeDiscriminator));
System.Xaml (8)
System\Xaml\MS\Impl\XmlNsInfo.cs (2)
193result.Add(new XmlNsDefinition { ClrNamespace = clrns, XmlNamespace = xmlns }); 214xmlNamespaceList.Add(nsDef.XmlNamespace);
System\Xaml\Schema\Reflector.cs (1)
501cads.Add(_attributeData[i]);
System\Xaml\XamlSchemaContext.cs (4)
121result.Add(ns.Key); 1041_unexaminedAssemblies.Add(assembly); 1066_unexaminedAssemblies.Add(args.LoadedAssembly); 1123_unexaminedAssemblies.Add(unexaminedAssembliesCopy[j]);
System\Xaml\XamlTypeName.cs (1)
51TypeArguments.Add(new XamlTypeName(argumentType));
WindowsFormsIntegration (1)
System\Windows\Integration\HostUtils.cs (1)
292encoder.Frames.Add(BitmapFrame.Create(bmp));
XmlFormattersWebSite (4)
Startup.cs (4)
94xmlSerializerInputFormatter.WrapperProviderFactories.Add(new PersonWrapperProviderFactory()); 95xmlSerializerOutputFormatter.WrapperProviderFactories.Add(new PersonWrapperProviderFactory()); 96dcsInputFormatter.WrapperProviderFactories.Add(new PersonWrapperProviderFactory()); 97dcsOutputFormatter.WrapperProviderFactories.Add(new PersonWrapperProviderFactory());
xunit.console (2)
CommandLine.cs (2)
444project.Filters.IncludedMethods.Add(option.Value); 451project.Filters.ExcludedMethods.Add(option.Value);