108 references to SetValue
Microsoft.AspNetCore.Components (1)
Reflection\PropertySetter.cs (1)
43_setterDelegate = property.SetValue;
Microsoft.AspNetCore.Components.Endpoints (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
306return propertyInfo.SetValue;
Microsoft.AspNetCore.Http.Abstractions (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
306return propertyInfo.SetValue;
Microsoft.AspNetCore.Http.Extensions.Tests (35)
ValidationsGenerator\ValidationsGenerator.ValidatableType.cs (35)
97type.GetProperty("IntegerWithRange")?.SetValue(instance, 5); 116type.GetProperty("IntegerWithRangeAndDisplayName")?.SetValue(instance, 5); 135type.GetProperty("PropertyWithMemberAttributes")?.SetValue(instance, null); 155subType.GetType().GetProperty("RequiredProperty")?.SetValue(subType, ""); 156subType.GetType().GetProperty("StringWithLength")?.SetValue(subType, "way-too-long"); 157type.GetProperty("PropertyWithMemberAttributes")?.SetValue(instance, subType); 183inheritanceType.GetType().GetProperty("RequiredProperty")?.SetValue(inheritanceType, ""); 184inheritanceType.GetType().GetProperty("StringWithLength")?.SetValue(inheritanceType, "way-too-long"); 185inheritanceType.GetType().GetProperty("EmailString")?.SetValue(inheritanceType, "not-an-email"); 186type.GetProperty("PropertyWithInheritance")?.SetValue(instance, inheritanceType); 220subType1.GetType().GetProperty("RequiredProperty")?.SetValue(subType1, ""); 221subType1.GetType().GetProperty("StringWithLength")?.SetValue(subType1, "way-too-long"); 225subType2.GetType().GetProperty("RequiredProperty")?.SetValue(subType2, "valid"); 226subType2.GetType().GetProperty("StringWithLength")?.SetValue(subType2, "way-too-long"); 230subType3.GetType().GetProperty("RequiredProperty")?.SetValue(subType3, "valid"); 231subType3.GetType().GetProperty("StringWithLength")?.SetValue(subType3, "valid"); 238type.GetProperty("ListOfSubTypes")?.SetValue(instance, subTypeList); 268type.GetProperty("IntegerWithCustomValidationAttribute")?.SetValue(instance, 5); // Odd number, should fail 287type.GetProperty("PropertyWithMultipleAttributes")?.SetValue(instance, 5); 314type.GetProperty("IntegerWithCustomValidationAttribute")?.SetValue(instance, 3); // Odd number should fail 335type.GetProperty("IntegerWithRange")?.SetValue(instance, 50); 336type.GetProperty("IntegerWithRangeAndDisplayName")?.SetValue(instance, 50); 340subType1.GetType().GetProperty("RequiredProperty")?.SetValue(subType1, "valid"); 341subType1.GetType().GetProperty("StringWithLength")?.SetValue(subType1, "valid"); 342type.GetProperty("PropertyWithMemberAttributes")?.SetValue(instance, subType1); 346subType2.GetType().GetProperty("RequiredProperty")?.SetValue(subType2, "valid"); 347subType2.GetType().GetProperty("StringWithLength")?.SetValue(subType2, "valid"); 348type.GetProperty("PropertyWithoutMemberAttributes")?.SetValue(instance, subType2); 352inheritanceType.GetType().GetProperty("RequiredProperty")?.SetValue(inheritanceType, "valid"); 353inheritanceType.GetType().GetProperty("StringWithLength")?.SetValue(inheritanceType, "valid"); 354inheritanceType.GetType().GetProperty("EmailString")?.SetValue(inheritanceType, "test@example.com"); 355type.GetProperty("PropertyWithInheritance")?.SetValue(instance, inheritanceType); 359type.GetProperty("ListOfSubTypes")?.SetValue(instance, emptyList); 362type.GetProperty("IntegerWithCustomValidationAttribute")?.SetValue(instance, 2); // Even number should pass 363type.GetProperty("PropertyWithMultipleAttributes")?.SetValue(instance, 12);
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
306return propertyInfo.SetValue;
Microsoft.AspNetCore.Mvc.TagHelpers.Test (6)
AnchorTagHelperTest.cs (2)
508typeof(AnchorTagHelper).GetProperty(propertyName).SetValue(anchorTagHelper, "Home"); 544typeof(AnchorTagHelper).GetProperty(propertyName).SetValue(anchorTagHelper, "Home");
FormActionTagHelperTest.cs (2)
532typeof(FormActionTagHelper).GetProperty(propertyName).SetValue(tagHelper, "Home"); 567typeof(FormActionTagHelper).GetProperty(propertyName).SetValue(tagHelper, "Home");
FormTagHelperTest.cs (2)
1029typeof(FormTagHelper).GetProperty(propertyName).SetValue(formTagHelper, "Home"); 1060typeof(FormTagHelper).GetProperty(propertyName).SetValue(formTagHelper, "Home");
Microsoft.AspNetCore.Routing (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
306return propertyInfo.SetValue;
Microsoft.AspNetCore.Routing.Abstractions (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
306return propertyInfo.SetValue;
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Common\DeploymentParameters.cs (1)
81propertyInfo.SetValue(this, propertyInfo.GetValue(parameters));
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
306return propertyInfo.SetValue;
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HttpConnectionFactoryTests.cs (1)
112property.SetValue(options, testValues[property.Name]);
Microsoft.Build (2)
PrintLineDebugger.cs (2)
87CommonWriterProperty.Value.SetValue(null, (CommonWriterType)LockWrappedWriter); 108CommonWriterProperty.Value.SetValue(null, null);
Microsoft.Build.Engine.OM.UnitTests (2)
PrintLineDebugger.cs (2)
87CommonWriterProperty.Value.SetValue(null, (CommonWriterType)LockWrappedWriter); 108CommonWriterProperty.Value.SetValue(null, null);
Microsoft.Build.Engine.UnitTests (3)
BackEnd\FailingTask.cs (1)
17BuildEngine.GetType().GetProperty("AllowFailureWithoutError").SetValue(BuildEngine, AllowFailureWithoutError.Equals("True"));
Telemetry\OpenTelemetryManager_Tests.cs (1)
139defaultSourceProp?.SetValue(instance, null);
Telemetry\Telemetry_Tests.cs (1)
194?.SetValue(instance, null);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
VbcTests.cs (1)
483typeof(Vbc).GetProperty("UsedCommandLineTool", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)?.SetValue(vbc, true);
Microsoft.Build.Tasks.Core (2)
PrintLineDebugger.cs (2)
87CommonWriterProperty.Value.SetValue(null, (CommonWriterType)LockWrappedWriter); 108CommonWriterProperty.Value.SetValue(null, null);
Microsoft.Build.Utilities.Core (2)
PrintLineDebugger.cs (2)
87CommonWriterProperty.Value.SetValue(null, (CommonWriterType)LockWrappedWriter); 108CommonWriterProperty.Value.SetValue(null, null);
Microsoft.Extensions.AI.Abstractions.Tests (6)
Utilities\AIJsonUtilitiesTests.cs (6)
93property.SetValue(options1, !booleanFlag); 94property.SetValue(options2, !booleanFlag); 99property.SetValue(options1, transformer); 100property.SetValue(options2, transformer); 105property.SetValue(options1, includeParameter); 106property.SetValue(options2, includeParameter);
Microsoft.Extensions.Configuration.Binder (2)
ConfigurationBinder.cs (2)
285property.SetValue(instance, property.GetValue(instance)); 316property.SetValue(instance, propertyBindingPoint.Value);
Microsoft.Maui.Controls (3)
Shell\ShellContent.cs (3)
398 prop.SetValue(content, value); 403 prop.SetValue(content, castValue); 412 prop.SetValue(content, null);
Microsoft.ML.Data (1)
Data\SchemaDefinition.cs (1)
191cursorChannelAttrPropertyInfo.SetValue(obj, channel);
Microsoft.ML.Tokenizers.Tests (2)
LlamaTests.cs (2)
72propertyInfo.SetValue(tokenizer, true); 78propertyInfo.SetValue(tokenizer.Normalizer, true);
MSBuild (2)
PrintLineDebugger.cs (2)
87CommonWriterProperty.Value.SetValue(null, (CommonWriterType)LockWrappedWriter); 108CommonWriterProperty.Value.SetValue(null, null);
PresentationFramework (1)
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (1)
355ex.GetType().GetProperty("HResult").SetValue(ex, value);
System.Composition.TypedParts (1)
System\Composition\CompositionContextExtensions.cs (1)
62pi.SetValue(objectWithLooseImports, value);
System.Linq.Expressions (1)
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
3228_property.SetValue(obj, value);
System.Net.Security (5)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (5)
149pooledConnectionIdleTimeoutProp.SetValue(socketsHttpHandler, TimeSpan.FromSeconds(PooledConnectionIdleTimeoutSeconds)); 150allowAutoRedirectProp.SetValue(socketsHttpHandler, false); 152maxResponseContentBufferSizeProp.SetValue(httpClient, AiaDownloadLimit); 168requestUriProp.SetValue(requestMessage, uri); 213requestUriProp.SetValue(requestMessage, redirectUri);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\AccessorBuilder.cs (1)
137propInfo.SetValue(obj, val);
System.Private.Windows.Core.TestUtilities (1)
TestAccessor.cs (1)
206propertyInfo.SetValue(_instance, value);
System.Private.Xml (2)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (2)
619result = new ReflectionXmlSerializationReaderHelper.SetMemberValueDelegate(propInfo.SetValue); 2121return propInfo.SetValue;
System.Security.Cryptography (5)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (5)
149pooledConnectionIdleTimeoutProp.SetValue(socketsHttpHandler, TimeSpan.FromSeconds(PooledConnectionIdleTimeoutSeconds)); 150allowAutoRedirectProp.SetValue(socketsHttpHandler, false); 152maxResponseContentBufferSizeProp.SetValue(httpClient, AiaDownloadLimit); 168requestUriProp.SetValue(requestMessage, uri); 213requestUriProp.SetValue(requestMessage, redirectUri);
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\ToolStripEditorManagerTests.cs (1)
201boundsProperty.SetValue(_toolStripEditorControl, newBounds);
System.Windows.Forms.Tests (12)
MaskedTextBoxTests.cs (2)
717property.SetValue(maskedTextBox, value); 721property.SetValue(maskedTextBox, !value);
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (4)
1688control.GetType().GetProperty(nameof(Label.UseMnemonic)).SetValue(control, false); 1709control.GetType().GetProperty(nameof(Label.UseMnemonic)).SetValue(control, true); 1731control.GetType().GetProperty(nameof(Label.UseMnemonic)).SetValue(control, false); 1739control.GetType().GetProperty(nameof(Label.UseMnemonic)).SetValue(control, true);
System\Windows\Forms\DataGridViewButtonColumnTests.cs (2)
59_column.GetType().GetProperty("CellTemplate")!.SetValue(_column, null); 102_column.GetType().GetProperty("CellTemplate")!.SetValue(_column, null);
System\Windows\Forms\ToolStripLabelTests.cs (1)
234property!.SetValue(_toolStripLabel, color);
ToolStripContainerTests.cs (3)
49propertyInfo.SetValue(_toolStripContainer, value); 225propertyInfo.SetValue(_toolStripContainer, true); 229propertyInfo.SetValue(_toolStripContainer, false);