7 overrides of GetValue
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\FieldOnTypeBuilderInstantiation.cs (1)
69public override object GetValue(object? obj) { throw new InvalidOperationException(); }
src\System\Reflection\Emit\RuntimeFieldBuilder.cs (1)
88public override object? GetValue(object? obj)
src\System\Reflection\MdFieldInfo.cs (1)
83public override object? GetValue(object? obj)
src\System\Reflection\RtFieldInfo.cs (1)
84public override object? GetValue(object? obj) => FieldAccessor.GetValue(obj);
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingFieldInfo.cs (1)
106public override object? GetValue(object? obj)
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Fields\RoField.cs (1)
146public sealed override object GetValue(object? obj) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System.Runtime.Serialization.Formatters (1)
System\Runtime\Serialization\SerializationFieldInfo.cs (1)
47public override object? GetValue(object? obj) => m_field.GetValue(obj);
251 references to GetValue
Aspire.Azure.Messaging.EventHubs.Tests (2)
ConformanceTestsBase.cs (2)
90var client1 = clientAccessor?.GetValue(healthCheck1); 91var client2 = clientAccessor?.GetValue(healthCheck2);
Aspire.RabbitMQ.Client.v7.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (1)
204.GetValue(null)!;
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (1)
225return obj => (TField?)field.GetValue(obj);
dotnet-svcutil-lib (8)
CodeDomFixup\CodeDomHelpers.cs (1)
29s_referenceKey = referenceKeyField.GetValue(null);
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (1)
427return new ConstantModel(fieldInfo, ((IConvertible)fieldInfo.GetValue(null)).ToInt64(null));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\EnumDataContract.cs (1)
319object enumValue = field.GetValue(null);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (1)
985s_valueOfDBNull = fieldInfo.GetValue(null);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (2)
1001object fieldValue = field.GetValue(attribute); 1002object defaultValue = field.GetValue(defaultAttribute);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (1)
606return ((FieldInfo)memberInfo).GetValue(_instance);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (1)
288bodyPartValues[i++] = field.GetValue(bodyObject);
InMemory.FunctionalTests (6)
Http2\Http2ConnectionTests.cs (2)
257var contentTypeValue1 = (StringValues)headerReferences1.GetType().GetField("_ContentType").GetValue(headerReferences1); 275var contentTypeValue2 = (StringValues)headerReferences2.GetType().GetField("_ContentType").GetValue(headerReferences2);
Http3\Http3ConnectionTests.cs (4)
504var headerReferences1 = typeof(HttpRequestHeaders).GetField("_headers", privateFlags).GetValue(http3Stream1.RequestHeaders); 505var contentTypeValue1 = (StringValues)headerReferences1.GetType().GetField("_ContentType").GetValue(headerReferences1); 511var headerReferences2 = typeof(HttpRequestHeaders).GetField("_headers", privateFlags).GetValue(http3Stream2.RequestHeaders); 512var contentTypeValue2 = (StringValues)headerReferences1.GetType().GetField("_ContentType").GetValue(headerReferences2);
Metrics (3)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
20return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (2)
57return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 58type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
Metrics.Legacy (3)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
20return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (2)
57return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 58type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\Infrastructure\EmbeddedLanguageCommentOptions.cs (1)
27.ToDictionary(f => f.Name, f => (TOptions)f.GetValue(null)!, StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Components.WebView.Photino (1)
PhotinoSynchronizationContext.cs (1)
52.GetValue(_window)!;
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (1)
401.ToDictionary(f => f.GetValue(null)!,
Microsoft.AspNetCore.Grpc.Swagger (1)
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (1)
401.ToDictionary(f => f.GetValue(null)!,
Microsoft.AspNetCore.Http.Tests (3)
DefaultHttpContextTests.cs (3)
347var boxedActualStruct = field.GetValue(value); 379Assert.Same(features, field.GetValue(value)); 383var v = field.GetValue(value);
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
191var value = ((Enum)field.GetValue(obj: null)!).ToString("d");
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
HttpRequestHeadersTests.cs (1)
144var methodValue = (StringValues)headerReferences.GetType().GetField("_Method").GetValue(headerReferences);
Microsoft.AspNetCore.Shared.Tests (2)
runtime\Http2\DynamicTableTest.cs (2)
131while ((int)insertIndexField.GetValue(table) != 0); 134while ((int)insertIndexField.GetValue(table) != targetInsertIndex)
Microsoft.Build (1)
BuildEnvironmentHelper.cs (1)
401_runningTests = (bool)runningTestsField.GetValue(null);
Microsoft.Build.Engine.OM.UnitTests (1)
BuildEnvironmentHelper.cs (1)
401_runningTests = (bool)runningTestsField.GetValue(null);
Microsoft.Build.Tasks.Core (1)
BuildEnvironmentHelper.cs (1)
401_runningTests = (bool)runningTestsField.GetValue(null);
Microsoft.Build.UnitTests.Shared (1)
EngineTestEnvironment.cs (1)
71return SingletonField.GetValue(null) != null;
Microsoft.Build.Utilities.Core (1)
BuildEnvironmentHelper.cs (1)
401_runningTests = (bool)runningTestsField.GetValue(null);
Microsoft.CodeAnalysis.Analyzers (3)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
20return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (2)
57return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 58type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
20return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (2)
57return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 58type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
Microsoft.CodeAnalysis.BannedApiAnalyzers (3)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
20return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (2)
57return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 58type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Lightup\NullableSyntaxAnnotationEx.cs (2)
24Oblivious = (SyntaxAnnotation?)nullableSyntaxAnnotation.GetField(nameof(Oblivious), BindingFlags.Static | BindingFlags.Public)?.GetValue(null); 25AnnotatedOrNotAnnotated = (SyntaxAnnotation?)nullableSyntaxAnnotation.GetField(nameof(AnnotatedOrNotAnnotated), BindingFlags.Static | BindingFlags.Public)?.GetValue(null);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (1)
4164var cloneMemberName = (string)typeof(WellKnownMemberNames).GetField("CloneMethodName", BindingFlags.NonPublic | BindingFlags.Static).GetValue(null);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (2)
Recommendations\KeywordRecommenderTests.cs (2)
30var kind = (SyntaxKind)field!.GetValue(recommender)!; 47var kind = (SyntaxKind)field!.GetValue(null)!;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Emit\CovariantReturnTests.cs (1)
357typeof(VisualBasic.VisualBasicCompilation).Assembly.GetType("Microsoft.CodeAnalysis.VisualBasic.ERRID").GetField("ERR_InvalidOverrideDueToReturn2").GetValue(null);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTestBase.cs (1)
51getSyntaxKind: s => (int)(SyntaxKind)typeof(SyntaxKind).GetField(s).GetValue(null),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\SyntaxTreeRootTests.cs (1)
82Assert.Null(syntaxTreeField.GetValue(node));
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Lightup\NullableSyntaxAnnotationEx.cs (2)
24Oblivious = (SyntaxAnnotation?)nullableSyntaxAnnotation.GetField(nameof(Oblivious), BindingFlags.Static | BindingFlags.Public)?.GetValue(null); 25AnnotatedOrNotAnnotated = (SyntaxAnnotation?)nullableSyntaxAnnotation.GetField(nameof(AnnotatedOrNotAnnotated), BindingFlags.Static | BindingFlags.Public)?.GetValue(null);
Microsoft.CodeAnalysis.EditorFeatures (1)
Shared\Utilities\ClassificationTypeMap.cs (1)
44var rawValue = (string?)field.GetValue(null);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
QuickInfo\ToolTipAssert.cs (3)
222var value = field.GetValue(null) as string; 237var value = field.GetValue(null) as Guid?; 252var value = field.GetValue(null) as int?;
Workspaces\TestWorkspaceFixture.cs (1)
120var existingProperties = (List<VisualStudio.Text.Formatting.TextFormattingRunProperties>)existingPropertiesField.GetValue(null);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
CodeActions\CodeChangeProviderMetadataTests.cs (1)
156.Select(field => (string)field.GetValue(null))];
Diagnostics\IDEDiagnosticIDUniquenessTest.cs (1)
20var listOfIDEDiagnosticIds = type.GetFields().Select(x => x.GetValue(null).ToString()).ToList();
Workspaces\ClassificationTypeNamesTests.cs (2)
26f => f.GetValue(null) is string value).Select(f => new[] { f.GetValue(null) });
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
ExpressionEvaluatorFatalError.cs (1)
30using var currentUserKey = (IDisposable)hKeyCurrentUserField.GetValue(null);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\ExpressionEvaluator\Core\Source\ExpressionCompiler\ExpressionEvaluatorFatalError.cs (1)
30using var currentUserKey = (IDisposable)hKeyCurrentUserField.GetValue(null);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (3)
Debugger\Engine\DkmClrValue.cs (1)
306var fieldValue = field.GetValue(RawValue);
Debugger\MemberInfo\FieldInfoImpl.cs (1)
109return Field.GetValue(obj);
src\ExpressionEvaluator\Core\Source\ExpressionCompiler\ExpressionEvaluatorFatalError.cs (1)
30using var currentUserKey = (IDisposable)hKeyCurrentUserField.GetValue(null);
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Editor\Shared\Utilities\FSharpClassificationTypeMap.cs (1)
39var value = string.Intern((string)field.GetValue(null));
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (1)
RazorPredefinedProviderNameTests.cs (1)
53.ToImmutableDictionary(field => field.Name, field => (string)field.GetValue(null)!);
Microsoft.CodeAnalysis.Features (2)
CodeFixes\FixAllOccurrences\AbstractFixAllCodeFixCodeAction.cs (1)
52names.Add((string)field.GetValue(null)!);
EmbeddedLanguages\EmbeddedLanguageCommentOptions.cs (1)
26.ToDictionary(f => f.Name, f => (TOptions)f.GetValue(null)!, StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
20return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (2)
57return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 58type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
Microsoft.CodeAnalysis.Scripting (2)
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (1)
250return field.GetValue(obj);
ScriptVariable.cs (1)
55return _field.GetValue(_instance);
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\ILValidation.cs (1)
237return (byte[])s_bufferField.GetValue(blob);
Microsoft.CodeAnalysis.UnitTests (4)
Collections\DebuggerAttributes.cs (2)
38return fieldInfo.GetValue(obj); 227member = fi.GetValue(obj);
PEWriter\InstructionOperandTypesTests.cs (1)
34OpCode opCode = (OpCode)fi.GetValue(null);
Text\TextChangeTests.cs (1)
599return (ImmutableArray<char[]>)chunkField.GetValue(text);
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
Emit\EditAndContinue\EditAndContinueTestBase.vb (2)
44Return New SourceWithMarkedNodes(WithWindowsLineBreaks(source.Value), Function(s) Parse(s, fileName, options), Function(s) CInt(GetType(SyntaxKind).GetField(s).GetValue(Nothing))) 48Return New SourceWithMarkedNodes(WithWindowsLineBreaks(source), Function(s) Parse(s, fileName, options), Function(s) CInt(GetType(SyntaxKind).GetField(s).GetValue(Nothing)))
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (2)
415var state = stateMember.GetValue(generatorDriver); 416var additionalTexts = (ImmutableArray<AdditionalText>)additionalTextsMember.GetValue(state)!;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
ObjectExtensions.cs (1)
52var result = fieldInfo.GetValue(instance);
Options\OptionsTestInfo.cs (1)
55var option = (IOption2)field.GetValue(null)!;
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (1)
219Delegate target = (Delegate)site.GetType().GetField("Target").GetValue(site);
Microsoft.Data.Analysis.Tests (1)
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
61ITest test = (ITest)output.GetType().GetField("test", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(output);
Microsoft.DotNet.XUnitExtensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (1)
165return () => (bool)fi.GetValue(null);
Microsoft.DotNet.XUnitV3Extensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (1)
165return () => (bool)fi.GetValue(null);
Microsoft.Extensions.AI.Abstractions (3)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (3)
76return (JsonConverter)thisFieldInfo.GetValue(nullableConverter)!; 105namingPolicy = (JsonNamingPolicy?)namingPolicyField.GetValue(enumConverter); 106int converterOptions = (int)converterOptionsField.GetValue(enumConverter)!;
Microsoft.Extensions.AI.AzureAIInference (3)
AzureAIInferenceChatClient.cs (1)
57?.GetValue(chatCompletionsClient) as Uri;
AzureAIInferenceEmbeddingGenerator.cs (1)
70?.GetValue(embeddingsClient) as Uri;
AzureAIInferenceImageEmbeddingGenerator.cs (1)
66?.GetValue(imageEmbeddingsClient) as Uri;
Microsoft.Extensions.AI.OpenAI (8)
OpenAIChatClient.cs (2)
50?.GetValue(chatClient) as Uri ?? DefaultOpenAIEndpoint; 52?.GetValue(chatClient) as string;
OpenAIEmbeddingGenerator.cs (2)
55?.GetValue(embeddingClient) as Uri)?.ToString() ?? 59string? modelId = modelField?.GetValue(embeddingClient) as string;
OpenAIResponseChatClient.cs (2)
53?.GetValue(responseClient) as Uri ?? DefaultOpenAIEndpoint; 55?.GetValue(responseClient) as string;
OpenAISpeechToTextClient.cs (2)
47?.GetValue(audioClient) as Uri ?? _defaultOpenAIEndpoint; 49?.GetValue(audioClient) as string;
Microsoft.Extensions.Caching.Hybrid.Tests (2)
TypeTests.cs (2)
24.GetValue(null)!); 40.GetValue(null)!);
Microsoft.Extensions.DependencyModel (2)
Utf8JsonReaderExtensions.cs (2)
139long lineNumber = (long)(typeof(JsonReaderState).GetField("_lineNumber", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(boxedState) ?? -1); 140long bytePositionInLine = (long)(typeof(JsonReaderState).GetField("_bytePositionInLine", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(boxedState) ?? -1);
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\HttpClientLoggingTagNamesTest.cs (1)
28.Select(f => (string)f.GetValue(null)!)
Microsoft.Extensions.Telemetry.Tests (2)
Enrichment\ApplicationEnricherTagTests.cs (1)
29.Select(f => (string)f.GetValue(null)!)
Enrichment\ProcessEnricherDimensionsTests.cs (1)
28.Select(f => (string)f.GetValue(null)!)
Microsoft.Maui (1)
Converters\KeyboardTypeConverter.cs (1)
32 if (field?.GetValue(null) is Keyboard kb)
Microsoft.Maui.Controls (4)
BindablePropertyConverter.cs (1)
103 var bp = bpinfo.GetValue(null) as BindableProperty;
BindingExpression.cs (1)
414 part.BindablePropertyField = bindablePropertyField.GetValue(null);
LayoutOptionsConverter.cs (1)
53 return (LayoutOptions)field.GetValue(null);
VisualElement\VisualElement_StyleSheet.cs (1)
48 return (styleAttribute.BindableProperty = bpField.GetValue(null) as BindableProperty);
Microsoft.Maui.Controls.Xaml (2)
ApplyPropertiesVisitor.cs (1)
325 return bindableFieldInfo.GetValue(null) as BindableProperty;
MarkupExtensions\StaticExtension.cs (1)
38 return finfo.GetValue(null);
Microsoft.Maui.Resizetizer (1)
ColorTable.cs (1)
39 dictionary[field.Name] = (SKColor)field.GetValue(null)!;
Microsoft.ML.Core (4)
CommandLine\CmdParser.cs (3)
1460DefaultValue = field.GetValue(defaults); 1512if (IsCollection && Field.GetValue(destination) == null) 1722return Field.GetValue(source);
EntryPoints\EntryPointUtils.cs (1)
63var fieldVal = fieldInfo.GetValue(args);
Microsoft.ML.Data (4)
EntryPoints\EntryPointNode.cs (1)
544var inputColName = inputInstance.GetType().GetField(colField).GetValue(inputInstance);
EntryPoints\InputBuilder.cs (3)
228var instanceVal = field.GetValue(instance); 229var defaultsVal = field.GetValue(defaults); 725yield return new KeyValuePair<string, object>(attr.Name ?? fieldInfo.Name, fieldInfo.GetValue(output));
Microsoft.ML.Ensemble (1)
Selector\SubModelSelector\BaseBestPerformanceSelector.cs (1)
60var valCur = field.GetValue(null);
Microsoft.ML.EntryPoints (4)
JsonUtils\JsonManifestUtils.cs (4)
183var defaultValue = fieldInfo.GetValue(defaults); 191var val = fieldInfo.GetValue(defaults) as Optional; 499object actualValue = fieldInfo.GetValue(value); 504object defaultValue = fieldInfo.GetValue(defaults);
Microsoft.ML.IntegrationTests (3)
IntegrationTestBaseClass.cs (1)
53ITest test = (ITest)output.GetType().GetField("test", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(output);
Prediction.cs (2)
120Assert.True((bool)field.GetValue(model)); 136Assert.False((bool)field.GetValue(model));
Microsoft.ML.LightGbm (1)
LightGbmArguments.cs (1)
188res[name] = field.GetValue(BoosterOptions);
Microsoft.ML.TestFramework (1)
BaseTestClass.cs (1)
61ITest test = (ITest)output.GetType().GetField("test", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(output);
Microsoft.ML.Tests (3)
CollectionsDataViewTest.cs (3)
58var xvalue = field.GetValue(x); 59var yvalue = field.GetValue(y); 189field.SetValue(data[0], fi.GetValue(null));
Microsoft.VisualBasic.Core (5)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (2)
1461CType(c.GetType().GetField("Target").GetValue(c), System.Delegate) 1488CType(c.GetType().GetField("Target").GetValue(c), System.Delegate)
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (2)
109ValueOfField = CType(mi, FieldInfo).GetValue(o) 356FieldValue = CType(mi, FieldInfo).GetValue(o)
Microsoft\VisualBasic\CompilerServices\Symbols.vb (1)
1115Return field.GetValue(_instance)
Microsoft.VisualStudio.LanguageServices (1)
Venus\ContainedLanguage.IVsContainedLanguage.cs (1)
60if (field.GetValue(intellisenseHost) is not IVsTextView view)
MSBuild (1)
BuildEnvironmentHelper.cs (1)
401_runningTests = (bool)runningTestsField.GetValue(null);
MSBuildTaskHost (1)
BuildEnvironmentHelper.cs (1)
401_runningTests = (bool)runningTestsField.GetValue(null);
PresentationCore (1)
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
1099DependencyProperty windowChromeWorkerProperty = fiWindowChromeWorkerProperty?.GetValue(null) as DependencyProperty;
PresentationFramework (11)
MS\Internal\LayoutDump.cs (2)
903object paraClient = field.GetValue(paragraph); 955CellParaClient cellParaClient = (CellParaClient) fieldOfParaClient.GetValue(paragraph);
MS\Internal\SystemDataHelper.cs (1)
73return nullField.GetValue(null);
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (4)
66objRef = (IObjectReference)type.GetField(objRefWrapper.ObjectReferenceField, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly).GetValue(o); 112Vtable = (IntPtr)ifaceAbiType.FindVftblType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null) 123Vtable = (IntPtr)compatibleIfaceAbiType.FindVftblType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null) 133Vtable = (IntPtr)obj.GetType().GetHelperType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null)
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (1)
25return (Guid)type.GetField("PIID").GetValue(null);
System\Windows\Input\Command\CommandConverter.cs (1)
148command = fieldInfo.GetValue(null) as ICommand;
System\Windows\Standard\ErrorCodes.cs (2)
316var hr = (HRESULT)publicStaticField.GetValue(null); 331var error = (Win32Error)publicStaticField.GetValue(null);
PresentationFramework-SystemCore (2)
DynamicAccessorImpl.cs (2)
84_getterDelegate = (MulticastDelegate)targetField.GetValue(_getterCallSite); 104_setterDelegate = (MulticastDelegate)targetField.GetValue(_setterCallSite);
Roslyn.Diagnostics.Analyzers (3)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
20return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (2)
57return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 58type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
Shared (3)
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (3)
76return (JsonConverter)thisFieldInfo.GetValue(nullableConverter)!; 105namingPolicy = (JsonNamingPolicy?)namingPolicyField.GetValue(enumConverter); 106int converterOptions = (int)converterOptionsField.GetValue(enumConverter)!;
System.ComponentModel.Composition (1)
Microsoft\Internal\ReflectionInvoke.cs (1)
28return field.GetValue(instance);
System.ComponentModel.TypeConverter (2)
System\ComponentModel\AttributeCollection.cs (1)
265attr = (Attribute?)field.GetValue(null);
System\ComponentModel\Design\Serialization\InstanceDescriptor.cs (1)
142return ((FieldInfo)MemberInfo).GetValue(null);
System.Data.Common (2)
System\Data\Common\DbProviderFactories.cs (1)
185object? factory = providerInstance.GetValue(null);
System\Data\Common\SqlUDTStorage.cs (1)
54return fieldInfo.GetValue(null)!;
System.Drawing.Common.Tests (1)
System\Drawing\IconTests.cs (1)
759expectedBitDepth = (int)fi.GetValue(null);
System.Linq.Expressions (4)
System\Linq\Expressions\Interpreter\FieldOperations.cs (2)
35frame.Push(_field.GetValue(obj: null)); 56frame.Push(_field.GetValue(self));
System\Linq\Expressions\Interpreter\LightCompiler.cs (2)
2452_instructions.EmitLoad(fi.GetValue(obj: null), fi.FieldType); 2463_instructions.EmitLoad(fi.GetValue(obj: null), fi.FieldType);
System.Net.Requests (1)
System\Net\HttpWebRequest.cs (1)
1696var settings = typeof(SocketsHttpHandler).GetField("_settings", BindingFlags.NonPublic | BindingFlags.Instance)?.GetValue(handler);
System.Private.CoreLib (8)
src\libraries\System.Private.CoreLib\src\System\Attribute.cs (3)
39thisResult = thisFields[i].GetValue(thisObj); 40thatResult = thisFields[i].GetValue(obj); 66object? fieldValue = fields[i].GetValue(this);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncMethodBuilderCore.cs (1)
100sb.Append(" ").Append(fi.Name).Append(": ").Append(fi.GetValue(stateMachine)).AppendLine();
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (2)
501Array a = (Array)selFld.GetValue(target)!; 521return selFld.GetValue(target);
src\System\ValueType.cs (2)
53object? thisResult = thisFields[i].GetValue(this); 54object? thatResult = thisFields[i].GetValue(obj);
System.Private.DataContractSerialization (6)
System\Runtime\Serialization\AccessorBuilder.cs (1)
85var value = fieldInfo.GetValue(obj);
System\Runtime\Serialization\EnumDataContract.cs (5)
245memberContract.Order = _isULong ? (long)Convert.ToUInt64(field.GetValue(null)) : Convert.ToInt64(field.GetValue(null)); 260memberContract.Order = _isULong ? (long)Convert.ToUInt64(field.GetValue(null)) : Convert.ToInt64(field.GetValue(null)); 269object? enumValue = field.GetValue(null);
System.Private.Windows.Core (4)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (4)
272typeof(Color).GetField("name", BindingFlags.NonPublic | BindingFlags.Instance)!.GetValue(value) is not string name ? null : new BinaryObjectString(2, name), 273(long)typeof(Color).GetField("value", BindingFlags.NonPublic | BindingFlags.Instance)!.GetValue(value)!, 274(short)typeof(Color).GetField("knownColor", BindingFlags.NonPublic | BindingFlags.Instance)!.GetValue(value)!, 275(short)typeof(Color).GetField("state", BindingFlags.NonPublic | BindingFlags.Instance)!.GetValue(value)!
System.Private.Windows.Core.TestUtilities (3)
DebuggerAttributes.cs (2)
21return GetField(obj, fieldName).GetValue(obj); 194member = field.GetValue(obj);
TestAccessor.cs (1)
193FieldInfo fieldInfo => fieldInfo.GetValue(_instance),
System.Private.Xml (5)
System\Xml\Serialization\Models.cs (1)
447return new ConstantModel(fieldInfo, ((IConvertible)fieldInfo.GetValue(null)!).ToInt64(null));
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
668return fieldInfo.GetValue(o);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (1)
831return memberField.GetValue(o);
System\Xml\Xslt\XslCompiledTransform.cs (2)
202byte[]? queryData = fldData.GetValue(/*this:*/null) as byte[]; 207Type[]? earlyBoundTypes = (Type[]?)fldTypes.GetValue(null);
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingFieldInfo.cs (1)
108return UnderlyingField.GetValue(obj);
System.Runtime.Serialization.Formatters (2)
System\Runtime\Serialization\FormatterServices.cs (1)
278data[i] = field.GetValue(obj);
System\Runtime\Serialization\SerializationFieldInfo.cs (1)
47public override object? GetValue(object? obj) => m_field.GetValue(obj);
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (1)
166return (TProperty)fieldInfo.GetValue(obj)!;
System.Windows.Forms (3)
System\Windows\Forms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (1)
130if (field.GetValue(null) is Attribute attribute)
System\Windows\Forms\FeatureSupport.cs (2)
36object? featureId = c?.GetField(featureConstName)?.GetValue(null); 60object? featureId = c?.GetField(featureConstName)?.GetValue(null);
System.Windows.Forms.Design (3)
System\ComponentModel\Design\InheritanceService.cs (1)
105object? value = field.GetValue(component);
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
816result = field.GetValue(instance);
System\Windows\Forms\Design\DocumentDesigner.DocumentInheritanceService.cs (1)
63child = (Control?)field.GetValue(component);
System.Windows.Forms.Design.Tests (2)
System\Windows\Forms\Design\AnchorEditorTests.cs (1)
91.GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(anchorUI);
System\Windows\Forms\Design\ContentAlignmentEditorTests.cs (1)
31.GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance).GetValue(contentUI);
System.Windows.Forms.Tests (5)
NumericUpDownTests.cs (1)
832return (bool)initializing.GetValue(this);
System\Windows\Forms\CommonDialogTests.cs (2)
245Assert.Equal(IntPtr.Zero, dialog.OwnerWndProc(IntPtr.Zero, (int)(MessageId)field.GetValue(null), IntPtr.Zero, IntPtr.Zero)); 265Assert.Equal(IntPtr.Zero, dialog.OwnerWndProc(IntPtr.Zero, (int)(MessageId)field.GetValue(null) + 1, IntPtr.Zero, IntPtr.Zero));
System\Windows\Forms\ContainerControlTests.cs (2)
1373object instance = typeof(KeyboardToolTipStateMachine).GetField("s_instance", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); 1389object instance = typeof(KeyboardToolTipStateMachine).GetField("s_instance", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);
System.Windows.Forms.TestUtilities (1)
SystemEventsHelper.cs (1)
22string windowClassName = windowClassNameField.GetValue(null) as string;
System.Windows.Forms.UI.IntegrationTests (1)
Infra\ControlTestBase.cs (1)
51return (ITest)testMember.GetValue(testOutputHelper)!;
System.Xaml (1)
System\Windows\Markup\StaticExtension.cs (1)
125value = field.GetValue(null);
System.Xaml.Tests (4)
System\Xaml\XamlNodeListTests.cs (2)
594Delegate addDelegate = Assert.IsAssignableFrom<Delegate>(addDelegateField.GetValue(writer)); 617Delegate addLineInfoDelegate = Assert.IsAssignableFrom<Delegate>(addLineInfoDelegateField.GetValue(writer));
System\Xaml\XamlNodeQueueTests.cs (2)
506Delegate addDelegate = Assert.IsAssignableFrom<Delegate>(addDelegateField.GetValue(writer)); 529Delegate addLineInfoDelegate = Assert.IsAssignableFrom<Delegate>(addLineInfoDelegateField.GetValue(writer));
Test.Utilities (3)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
20return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (2)
57return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 58type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
Text.Analyzers (3)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
20return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (2)
57return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 58type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
UIAutomationClient (1)
MS\Internal\Automation\ProxyManager.cs (1)
73ClientSideProviderDescription[] table = fi.GetValue(null) as ClientSideProviderDescription[];
VBCSCompiler.UnitTests (1)
NamedPipeTestUtil.cs (1)
30var servers = (IDictionary?)serversField?.GetValue(null);
VisualBasicRuntimeTest (1)
Program.cs (1)
165var control = (Control)controlField.GetValue(form);
WindowsBase.Tests (4)
System\Windows\WeakEventManagerTests.cs (4)
944object actualSource = actualSourceField.GetValue(null)!; 1316object actualSource = actualSourceField.GetValue(null)!; 1692object actualSource = actualSourceField.GetValue(null)!; 2230object actualSource = actualSourceField.GetValue(null)!;
xunit.assert (2)
Sdk\ArgumentFormatter.cs (1)
337 .Select(f => new { name = f.Name, value = WrapAndGetFormattedValue(() => f.GetValue(value), depth) });
Sdk\AssertHelper.cs (1)
143 .Select(f => new { name = f.Name, getter = (Func<object?, object?>)f.GetValue });