222 references to IsStatic
dotnet-svcutil-lib (8)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (1)
235if (getMethod.IsStatic) return false;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (2)
600else if (methodInfo.IsStatic) 1445if (thisObj != null && !methodInfo.IsStatic)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (1)
630foreach (MethodInfo mi in interfaceType.GetRuntimeMethods().Where(m => !m.IsStatic))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (4)
135foreach (MethodInfo methodInfo in aParentType.GetRuntimeMethods().Where(m => !m.IsStatic)) 687foreach (MethodInfo methodInfo in contractToGetMethodsFrom.GetRuntimeMethods().Where(m => !m.IsStatic)) 1320if (getMethod != null && (getMethod.IsStatic || IsMethodOverriding(getMethod))) 1325if (setMethod != null && (setMethod.IsStatic || IsMethodOverriding(setMethod)))
GetDocument.Insider (2)
Commands\GetDocumentCommandWorker.cs (2)
225if (generateWithVersionMethod.IsStatic) 438if (method.IsStatic)
Infrastructure.Common (2)
xunit\ConditionAttribute.cs (2)
113if (mi != null && mi.IsStatic && mi.GetParameters().Length == 0 && mi.ReturnType == typeof(bool)) 117if (pi != null && pi.PropertyType == typeof(bool) && pi.GetMethod != null && pi.GetMethod.IsStatic && pi.GetMethod.GetParameters().Length == 0)
Metrics (1)
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
110.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType));
Metrics.Legacy (1)
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
110.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType));
Microsoft.AspNetCore.Components.Endpoints (3)
src\Shared\PropertyHelper\PropertyHelper.cs (3)
209Debug.Assert(!getMethod.IsStatic); 279Debug.Assert(!setMethod.IsStatic); 545!property.GetMethod.IsStatic &&
Microsoft.AspNetCore.Hosting (2)
Internal\StartupLoader.cs (2)
48if (instance == null && (!configureMethod.MethodInfo.IsStatic || (servicesMethod?.MethodInfo != null && !servicesMethod.MethodInfo.IsStatic)))
Microsoft.AspNetCore.Http.Abstractions (3)
src\Shared\PropertyHelper\PropertyHelper.cs (3)
209Debug.Assert(!getMethod.IsStatic); 279Debug.Assert(!setMethod.IsStatic); 545!property.GetMethod.IsStatic &&
Microsoft.AspNetCore.Http.Extensions (3)
RequestDelegateFactory.cs (1)
240if (methodInfo.IsStatic)
src\Shared\ParameterBindingMethodCache.cs (2)
197stringBuilder.Append(invalidMethod.IsStatic ? "static " : "not-static "); 293stringBuilder.Append(invalidBindMethod.IsStatic ? "static " : "not-static");
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (1)
20from method in type.DeclaredMethods.Where(m => m.IsPublic && !m.IsStatic)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (1)
20from method in type.DeclaredMethods.Where(m => m.IsPublic && !m.IsStatic)
Microsoft.AspNetCore.Identity.Test (1)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (1)
20from method in type.DeclaredMethods.Where(m => m.IsPublic && !m.IsStatic)
Microsoft.AspNetCore.Mvc.Abstractions (2)
src\Shared\ParameterBindingMethodCache.cs (2)
197stringBuilder.Append(invalidMethod.IsStatic ? "static " : "not-static "); 293stringBuilder.Append(invalidBindMethod.IsStatic ? "static " : "not-static");
Microsoft.AspNetCore.Mvc.Core (5)
ApplicationModels\DefaultApplicationModelProvider.cs (1)
439if (methodInfo.IsStatic)
src\Shared\PropertyActivator\PropertyActivator.cs (1)
92!property.SetMethod.IsStatic;
src\Shared\PropertyHelper\PropertyHelper.cs (3)
209Debug.Assert(!getMethod.IsStatic); 279Debug.Assert(!setMethod.IsStatic); 545!property.GetMethod.IsStatic &&
Microsoft.AspNetCore.Mvc.RazorPages (1)
ApplicationModels\DefaultPageApplicationModelPartsProvider.cs (1)
163if (methodInfo.IsStatic)
Microsoft.AspNetCore.OpenApi (2)
src\Shared\ParameterBindingMethodCache.cs (2)
197stringBuilder.Append(invalidMethod.IsStatic ? "static " : "not-static "); 293stringBuilder.Append(invalidBindMethod.IsStatic ? "static " : "not-static");
Microsoft.AspNetCore.Routing (3)
src\Shared\PropertyHelper\PropertyHelper.cs (3)
209Debug.Assert(!getMethod.IsStatic); 279Debug.Assert(!setMethod.IsStatic); 545!property.GetMethod.IsStatic &&
Microsoft.AspNetCore.Routing.Abstractions (3)
src\Shared\PropertyHelper\PropertyHelper.cs (3)
209Debug.Assert(!getMethod.IsStatic); 279Debug.Assert(!setMethod.IsStatic); 545!property.GetMethod.IsStatic &&
Microsoft.AspNetCore.Shared.Tests (4)
src\Shared\PropertyActivator\PropertyActivator.cs (1)
92!property.SetMethod.IsStatic;
src\Shared\PropertyHelper\PropertyHelper.cs (3)
209Debug.Assert(!getMethod.IsStatic); 279Debug.Assert(!setMethod.IsStatic); 545!property.GetMethod.IsStatic &&
Microsoft.CodeAnalysis (3)
InternalUtilities\UICultureUtilities.cs (3)
33if ((object?)currentUICultureSetter == null || !currentUICultureSetter.IsStatic || currentUICultureSetter.ContainsGenericParameters || currentUICultureSetter.ReturnType != typeof(void)) 72if ((object?)currentThreadGetter == null || !currentThreadGetter.IsStatic || currentThreadGetter.ContainsGenericParameters || currentThreadGetter.ReturnType != type || currentThreadGetter.GetParameters().Length != 0) 79if ((object?)currentUICultureSetter == null || currentUICultureSetter.IsStatic || currentUICultureSetter.ContainsGenericParameters || currentUICultureSetter.ReturnType != typeof(void))
Microsoft.CodeAnalysis.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
110.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType));
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
110.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType));
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
110.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType));
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
110.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType));
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
110.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType));
Microsoft.CodeAnalysis.Scripting (1)
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (1)
336members.AddRange(type.DeclaredProperties.Where(f => f.GetMethod != null && !f.GetMethod.IsStatic));
Microsoft.CodeAnalysis.Test.Utilities (1)
Platform\Custom\MetadataSignatureHelper.cs (1)
564sb.Append(propertyAccessors[0].IsStatic ? "static " : "instance ");
Microsoft.CodeAnalysis.UnitTests (2)
AnalyzerAssemblyLoaderTests.cs (1)
225var obj = member.IsStatic
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (1)
59if (!method.IsStatic)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
src\Compilers\Core\Portable\InternalUtilities\UICultureUtilities.cs (3)
33if ((object?)currentUICultureSetter == null || !currentUICultureSetter.IsStatic || currentUICultureSetter.ContainsGenericParameters || currentUICultureSetter.ReturnType != typeof(void)) 72if ((object?)currentThreadGetter == null || !currentThreadGetter.IsStatic || currentThreadGetter.ContainsGenericParameters || currentThreadGetter.ReturnType != type || currentThreadGetter.GetParameters().Length != 0) 79if ((object?)currentUICultureSetter == null || currentUICultureSetter.IsStatic || currentUICultureSetter.ContainsGenericParameters || currentUICultureSetter.ReturnType != typeof(void))
Microsoft.CSharp (6)
Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs (1)
278if (!m.IsStatic)
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (5)
1251prop.isStatic = property.GetGetMethod(true) != null ? property.GetGetMethod(true).IsStatic : property.GetSetMethod(true).IsStatic; 1378(!method.IsStatic && method.IsSpecialName))) // Not static and is a special name 1430methodSymbol.isStatic = member.IsStatic; 1854if (method.IsSpecialName && method.IsStatic)
Microsoft.DotNet.RemoteExecutor (1)
Program.cs (1)
51if (!mi.IsStatic)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (4)
HelperFactory.cs (4)
63if (instance == null && !method.IsStatic) 89if (instance == null && !method.IsStatic) 142if (!method.IsStatic) 186if (!method.IsStatic)
Microsoft.DotNet.XUnitExtensions (2)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (2)
156if (mi != null && mi.IsStatic && mi.GetParameters().Length == 0 && mi.ReturnType == typeof(bool)) 160if (pi != null && pi.PropertyType == typeof(bool) && pi.GetMethod != null && pi.GetMethod.IsStatic && pi.GetMethod.GetParameters().Length == 0)
Microsoft.DotNet.XUnitV3Extensions (2)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (2)
156if (mi != null && mi.IsStatic && mi.GetParameters().Length == 0 && mi.ReturnType == typeof(bool)) 160if (pi != null && pi.PropertyType == typeof(bool) && pi.GetMethod != null && pi.GetMethod.IsStatic && pi.GetMethod.GetParameters().Length == 0)
Microsoft.Extensions.AI (3)
Functions\AIFunctionFactory.cs (3)
574if (!method.IsStatic && target is null) 602if (method.IsStatic) 655Debug.Assert(!FunctionDescriptor.Method.IsStatic, "Expected an instance method");
Microsoft.Maui (1)
Converters\KeyboardTypeConverter.cs (1)
35 PropertyInfo? property = kbType.GetProperties()?.FirstOrDefault(pi => pi != null && pi.Name == keyboard && pi.CanRead && (pi.GetMethod?.IsStatic ?? false));
Microsoft.Maui.Controls (4)
BindingExpression.cs (2)
394 if (property is { CanRead: true, GetMethod: { IsPublic: true, IsStatic: false } propertyGetMethod }) 399 if (property is { CanWrite: true, SetMethod: { IsPublic: true, IsStatic: false } propertySetMethod })
MessagingCenter.cs (1)
85 if (MethodInfo.IsStatic)
TypeConversionHelper.cs (1)
139 && method.IsStatic
Microsoft.Maui.Controls.Xaml (3)
ApplyPropertiesVisitor.cs (1)
506 addMethod.Invoke(element, new[] { mi.CreateDelegate(eventInfo.EventHandlerType, mi.IsStatic ? null : rootElement) });
CreateValuesVisitor.cs (1)
261 if (!m.IsStatic)
MarkupExtensions\StaticExtension.cs (1)
32 var pinfo = type.GetRuntimeProperties().FirstOrDefault(pi => pi.Name == membername && pi.GetMethod.IsStatic);
Microsoft.ML.Core (15)
CommandLine\CmdParser.cs (1)
1367if (meth != null && meth.IsStatic && !meth.IsPrivate && meth.ReturnType == type)
ComponentModel\ComponentCatalog.cs (2)
655if (!meth.IsPublic || !meth.IsStatic) 669if (!meth.IsStatic)
Utilities\FuncInstanceMethodInfo1`2.cs (1)
39Contracts.CheckParam(!GenericMethodDefinition.IsStatic, nameof(methodInfo), "Should be an instance method");
Utilities\FuncInstanceMethodInfo1`3.cs (1)
40Contracts.CheckParam(!GenericMethodDefinition.IsStatic, nameof(methodInfo), "Should be an instance method");
Utilities\FuncInstanceMethodInfo1`4.cs (1)
41Contracts.CheckParam(!GenericMethodDefinition.IsStatic, nameof(methodInfo), "Should be an instance method");
Utilities\FuncInstanceMethodInfo2`4.cs (1)
41Contracts.CheckParam(!GenericMethodDefinition.IsStatic, nameof(methodInfo), "Should be an instance method");
Utilities\FuncInstanceMethodInfo3`3.cs (1)
40Contracts.CheckParam(!GenericMethodDefinition.IsStatic, nameof(methodInfo), "Should be an instance method");
Utilities\FuncInstanceMethodInfo3`4.cs (1)
41Contracts.CheckParam(!GenericMethodDefinition.IsStatic, nameof(methodInfo), "Should be an instance method");
Utilities\FuncStaticMethodInfo1`1.cs (1)
29Contracts.CheckParam(GenericMethodDefinition.IsStatic, nameof(function), "Should be a static method");
Utilities\FuncStaticMethodInfo1`2.cs (1)
30Contracts.CheckParam(GenericMethodDefinition.IsStatic, nameof(function), "Should be a static method");
Utilities\FuncStaticMethodInfo1`3.cs (1)
31Contracts.CheckParam(GenericMethodDefinition.IsStatic, nameof(function), "Should be a static method");
Utilities\FuncStaticMethodInfo2`3.cs (1)
31Contracts.CheckParam(GenericMethodDefinition.IsStatic, nameof(function), "Should be a static method");
Utilities\FuncStaticMethodInfo3`2.cs (1)
30Contracts.CheckParam(GenericMethodDefinition.IsStatic, nameof(function), "Should be a static method");
Utilities\FuncStaticMethodInfo3`3.cs (1)
31Contracts.CheckParam(GenericMethodDefinition.IsStatic, nameof(function), "Should be a static method");
Microsoft.ML.Transforms (1)
Expression\LambdaBinder.cs (1)
1163if (!meth.IsStatic || !meth.IsPublic && !isIdent)
Microsoft.VisualBasic.Core (9)
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (5)
628If objType Is objIReflect OrElse method.IsStatic OrElse 874If objType Is objIReflect OrElse method.IsStatic OrElse 1090If objType Is objIReflect OrElse method.IsStatic OrElse 1216IsStatic = DirectCast(Member, MethodInfo).IsStatic 1222IsStatic = DirectCast(Member, ConstructorInfo).IsStatic
Microsoft\VisualBasic\CompilerServices\Symbols.vb (3)
654Return DirectCast(member, MethodInfo).IsStatic 660Return DirectCast(member, ConstructorInfo).IsStatic 663Return DirectCast(member, PropertyInfo).GetGetMethod.IsStatic
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (1)
2014If objType Is objIReflect OrElse Method.IsStatic OrElse
PresentationFramework (1)
System\Windows\PropertyPath.cs (1)
179return mi != null && mi.IsStatic;
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
110.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType));
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\LocalizableString.cs (1)
142if (getter == null || !(getter.IsPublic && getter.IsStatic))
System.ComponentModel.Composition (2)
System\ComponentModel\Composition\ReflectionModel\ReflectionMethod.cs (1)
37get { return !UnderlyingMethod.IsStatic; }
System\ComponentModel\Composition\ReflectionModel\ReflectionProperty.cs (1)
88return !method.IsStatic;
System.ComponentModel.TypeConverter (5)
System\ComponentModel\Design\Serialization\InstanceDescriptor.cs (3)
55if (ci.IsStatic) 66if (!mi.IsStatic) 82if (getMethod != null && !getMethod.IsStatic)
System\ComponentModel\ReflectTypeDescriptionProvider.cs (2)
1283if (getMethod != null && !getMethod.IsStatic && getMethod.IsPublic) 1287if (setMethod != null && (setMethod.IsStatic || !setMethod.IsPublic))
System.Composition.Hosting (2)
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (2)
54prop.GetMethod != null && prop.GetMethod.IsPublic && !prop.GetMethod.IsStatic && 55prop.SetMethod != null && prop.SetMethod.IsPublic && !prop.SetMethod.IsStatic))
System.Composition.TypedParts (6)
System\Composition\TypedParts\ActivationFeatures\OnImportsSatisfiedFeature.cs (1)
43if (!(m.IsPublic || m.IsAssembly) || m.IsStatic || m.ReturnType != typeof(void) ||
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
31.Where(pi => pi.CanWrite && pi.SetMethod.IsPublic && !(pi.SetMethod.IsStatic))
System\Composition\TypedParts\Discovery\DiscoveredPart.cs (3)
87foreach (var c in _partType.DeclaredConstructors.Where(ci => ci.IsPublic && !(ci.IsStatic))) 106_constructor ??= _partType.DeclaredConstructors.FirstOrDefault(ci => ci.IsPublic && !(ci.IsStatic || ci.GetParameters().Length != 0)); 147if (!constructorInfo.IsPublic || constructorInfo.IsStatic) continue;
System\Composition\TypedParts\Discovery\TypeInspector.cs (1)
79.Where(pi => pi.CanRead && pi.GetMethod.IsPublic && !pi.GetMethod.IsStatic))
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\DsesFilterAndTransform.cs (2)
790else if (propertyInfo.GetMethod?.IsStatic == true || propertyInfo.SetMethod?.IsStatic == true)
System.Linq.Expressions (43)
System\Linq\Expressions\BinaryExpression.cs (1)
765if (!method.IsStatic)
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (1)
172if (!node.Method.IsStatic &&
System\Linq\Expressions\Compiler\LambdaCompiler.cs (2)
242return index + (_hasClosureArgument ? 1 : 0) + (_method.IsStatic ? 0 : 1); 257Debug.Assert(_method.IsStatic, "must be a static method");
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (2)
374if (!method.IsStatic) 488if (mi.IsStatic)
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (2)
278Debug.Assert(b.Method!.IsStatic); 384Debug.Assert(b.Method!.IsStatic);
System\Linq\Expressions\ElementInit.cs (1)
114if (addMethod.IsStatic)
System\Linq\Expressions\ExpressionStringBuilder.cs (1)
784if (toString.DeclaringType != typeof(Expression) && !toString.IsStatic)
System\Linq\Expressions\IndexExpression.cs (3)
430if (getter.IsStatic ^ setter.IsStatic) 468if (method.IsStatic)
System\Linq\Expressions\Interpreter\CallInstruction.cs (7)
39if (!info.IsStatic) 54if (!info.IsStatic && info.DeclaringType!.IsValueType) 175if (!target.IsStatic) 202return pi.Length != index || (pi.Length == index && !target.IsStatic); 213if (!info.IsStatic) types.Add(info.DeclaringType!); 301if (_target.IsStatic) 398if (_target.IsStatic)
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (8)
248_isInstance = !target.IsStatic; 287_isInstance = !target.IsStatic; 326_isInstance = !target.IsStatic; 365_isInstance = !target.IsStatic; 425_isInstance = !target.IsStatic; 466_isInstance = !target.IsStatic; 507_isInstance = !target.IsStatic; 548_isInstance = !target.IsStatic;
System\Linq\Expressions\Interpreter\InstructionList.cs (1)
902Emit(new ByRefMethodInfoCallInstruction(method, method.IsStatic ? parameters.Length : parameters.Length + 1, byrefArgs));
System\Linq\Expressions\Interpreter\LightCompiler.cs (8)
667if (forBinding && method.IsStatic) 1366Debug.Assert(expr.Method.IsStatic); 1586if (equality != null && !equality.IsStatic) 2145if (!method.IsStatic) 2178if (!method.IsStatic && 2339if (!call.Method.IsStatic && 2487if (forBinding && method.IsStatic) 2497if (!method.IsStatic &&
System\Linq\Expressions\MemberExpression.cs (2)
274if (mi.IsStatic) 314flags |= (mi.IsStatic) ? BindingFlags.Static : BindingFlags.Instance;
System\Linq\Expressions\MethodCallExpression.cs (1)
1249if (method.IsStatic)
System\Linq\Expressions\NewExpression.cs (3)
331if (pi.GetGetMethod()!.IsStatic) 341if (method.IsStatic) 356if (constructor.IsStatic)
System.Linq.Queryable (1)
System\Linq\EnumerableRewriter.cs (1)
39if ((mInfo.IsStatic || mInfo.DeclaringType!.IsAssignableFrom(obj!.Type))
System.Private.CoreLib (18)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
3239if (/* method.IsVirtual || */ method.IsStatic)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TypeAnalysis.cs (1)
49if (getterInfo.IsStatic || !getterInfo.IsPublic)
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (4)
24bool hasThis = !emitNew && !method.IsStatic; 91bool hasThis = !emitNew && !method.IsStatic; 148bool hasThis = !(emitNew || method.IsStatic); 227else if (method.IsStatic || method.DeclaringType!.IsValueType)
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (1)
33!IsStatic &&
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (1)
85_isStatic = _method.IsStatic;
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvokerCommon.cs (1)
90Debug.Assert(!method.IsStatic);
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeConstructorInfo.cs (2)
27else if (IsStatic) 109if (!IsStatic)
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs (1)
112if (!IsStatic)
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (1)
207initializeMethod.IsStatic &&
src\System\Reflection\Emit\DynamicILGenerator.cs (2)
99if (!meth.IsStatic && 275if (methodInfo is not SymbolMethod && !methodInfo.IsStatic && !opcode.Equals(OpCodes.Newobj))
src\System\Reflection\Emit\RuntimeILGenerator.cs (1)
628if (methodInfo is not SymbolMethod && !methodInfo.IsStatic && !opcode.Equals(OpCodes.Newobj))
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (2)
298if (!IsStatic) 326if (!IsVirtual || IsStatic || m_declaringType == null || m_declaringType.IsInterface)
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\CodeGenerator.cs (2)
498else if (methodInfo.IsStatic) 1106if (thisObj != null && !methodInfo.IsStatic)
System.Private.Windows.Core.TestUtilities (1)
TestAccessor.cs (1)
79return (TDelegate)methodInfo.CreateDelegate(type, methodInfo.IsStatic ? null : _instance);
System.Private.Xml (2)
System\Xml\Serialization\Models.cs (1)
252if (getMethod.IsStatic) return false;
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (1)
3627if (!extFunc.Method!.IsStatic)
System.Reflection.DispatchProxy (2)
System\Reflection\DispatchProxyGenerator.cs (2)
425attributes |= mi.IsStatic ? MethodAttributes.Static : MethodAttributes.Virtual; 447if (mi.IsStatic)
System.Reflection.Emit (3)
System\Reflection\Emit\ILGeneratorImpl.cs (1)
669if (!methodInfo.IsStatic && !opcode.Equals(OpCodes.Newobj))
System\Reflection\Emit\MethodBuilderImpl.cs (1)
104_returnType, ModuleBuilderImpl.GetSignatureConvention(_callingConventions), GetGenericArguments().Length, !IsStatic, optionalParameterTypes: null,
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
795GetSignatureConvention(method.CallingConvention), method.GetGenericArguments().Length, !method.IsStatic, optionalParameterTypes);
System.Reflection.MetadataLoadContext (2)
System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs (2)
69if (derivedAccessor.IsStatic != baseAccessor.IsStatic)
System.Text.Json (4)
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (2)
80Debug.Assert(constructor.IsPublic && !constructor.IsStatic); 121Debug.Assert(!constructor.IsStatic);
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (2)
44Debug.Assert(constructor.DeclaringType == type && constructor.IsPublic && !constructor.IsStatic); 79Debug.Assert(constructor.DeclaringType == type && constructor.IsPublic && !constructor.IsStatic);
System.Xaml (6)
System\Xaml\Runtime\DynamicMethodRuntime.cs (4)
427Type targetType = getter.IsStatic ? getter.GetParameters()[0].ParameterType : GetTargetType(getter); 446Type targetType = setter.IsStatic ? parameters[0].ParameterType : GetTargetType(setter); 447Type valueType = setter.IsStatic ? parameters[1].ParameterType : parameters[0].ParameterType; 503OpCode callType = (method.IsStatic || method.DeclaringType.IsValueType) ? OpCodes.Call : OpCodes.Callvirt;
System\Xaml\Schema\XamlMemberInvoker.cs (2)
60if (UnderlyingGetter.IsStatic) 79if (UnderlyingSetter.IsStatic)
Test.Utilities (1)
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
110.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType));
Text.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
110.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType));
xunit.assert (2)
Sdk\ArgumentFormatter.cs (1)
342 .Where(p => p.GetMethod != null && p.GetMethod.IsPublic && !p.GetMethod.IsStatic)
Sdk\AssertHelper.cs (1)
155 && !p.GetMethod.IsStatic