196 references to IsStatic
Aspire.Hosting.RemoteHost (4)
AtsCapabilityScanner.cs (4)
375if (!method.IsStatic) 1053var isStatic = property.GetMethod?.IsStatic ?? property.SetMethod?.IsStatic ?? false; 1261if (method.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)
239if (generateWithVersionMethod.IsStatic) 452if (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)
Microsoft.AspNetCore.Components.Endpoints (3)
src\aspnetcore\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\aspnetcore\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)
241if (methodInfo.IsStatic)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (2)
197stringBuilder.Append(invalidMethod.IsStatic ? "static " : "not-static "); 293stringBuilder.Append(invalidBindMethod.IsStatic ? "static " : "not-static");
Microsoft.AspNetCore.Mvc.Abstractions (2)
src\aspnetcore\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\aspnetcore\src\Shared\PropertyActivator\PropertyActivator.cs (1)
92!property.SetMethod.IsStatic;
src\aspnetcore\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\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (2)
197stringBuilder.Append(invalidMethod.IsStatic ? "static " : "not-static "); 293stringBuilder.Append(invalidBindMethod.IsStatic ? "static " : "not-static");
Microsoft.AspNetCore.Routing (3)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (3)
209Debug.Assert(!getMethod.IsStatic); 279Debug.Assert(!setMethod.IsStatic); 545!property.GetMethod.IsStatic &&
Microsoft.AspNetCore.Routing.Abstractions (3)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (3)
209Debug.Assert(!getMethod.IsStatic); 279Debug.Assert(!setMethod.IsStatic); 545!property.GetMethod.IsStatic &&
Microsoft.CodeAnalysis.NetAnalyzers (1)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Lightup\LightupHelpers.cs (1)
75.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)
335members.AddRange(type.DeclaredProperties.Where(f => f.GetMethod != null && !f.GetMethod.IsStatic));
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.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (3)
542if (!method.IsStatic && target is null) 571if (method.IsStatic) 619Debug.Assert(!FunctionDescriptor.Method.IsStatic, "Expected an instance method");
Microsoft.Extensions.VectorData.Abstractions (1)
ProviderServices\Filter\FilterTranslatorBase.cs (1)
316case PropertyInfo { GetMethod.IsStatic: false } propertyInfo when baseValue is null:
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;
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)
1279if (getMethod != null && !getMethod.IsStatic && getMethod.IsPublic) 1283if (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)
782else 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)
295Debug.Assert(b.Method.IsStatic); 408Debug.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) 1382Debug.Assert(expr.Method.IsStatic); 1605if (equality != null && !equality.IsStatic) 2164if (!method.IsStatic) 2197if (!method.IsStatic && 2358if (!call.Method.IsStatic && 2506if (forBinding && method.IsStatic) 2516if (!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)
325if (pi.GetGetMethod()!.IsStatic) 335if (method.IsStatic) 350if (constructor.IsStatic)
System.Linq.Queryable (1)
System\Linq\EnumerableRewriter.cs (1)
39if ((mInfo.IsStatic || mInfo.DeclaringType!.IsAssignableFrom(obj!.Type))
System.Private.CoreLib (13)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
3145if (/* method.IsVirtual || */ method.IsStatic)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TypeAnalysis.cs (1)
49if (getterInfo.IsStatic || !getterInfo.IsPublic)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (1)
33!IsStatic &&
src\runtime\src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (1)
223initializeMethod.IsStatic &&
System\Reflection\DynamicInvokeInfo.cs (1)
61_isStatic = method.IsStatic;
System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs (2)
77if (derivedAccessor.IsStatic != baseAccessor.IsStatic)
System\Reflection\Runtime\MethodInfos\CustomMethodMapper.cs (1)
40InvokerOptions options = (methodBase.IsStatic || methodBase is ConstructorInfo || isNullable) ? InvokerOptions.AllowNullThis : InvokerOptions.None;
System\Reflection\Runtime\MethodInfos\RuntimeConstructorInfo.cs (1)
85if (this.IsStatic)
System\Reflection\Runtime\MethodInfos\RuntimeMethodInfo.cs (2)
108if (!IsVirtual || IsStatic || declaringType == null || declaringType.IsInterface) 331bool isStatic = this.IsStatic;
System\Reflection\Runtime\MethodInfos\RuntimePlainConstructorInfo.cs (1)
162if (this.IsStatic)
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.CoreGetDeclared.cs (1)
54if (optionalNameFilter == null || optionalNameFilter.Matches(syntheticConstructor.IsStatic ? ConstructorInfo.TypeConstructorName : ConstructorInfo.ConstructorName))
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\CodeGenerator.cs (2)
497else if (methodInfo.IsStatic) 1105if (thisObj != null && !methodInfo.IsStatic)
System.Private.Reflection.Execution (3)
Internal\Reflection\Execution\MethodInvokers\InstanceMethodInvoker.cs (2)
25if (methodInvokeInfo.Method.IsConstructor && !methodInvokeInfo.Method.IsStatic) 129if (methodInfo.DeclaringType.IsValueType && !methodInfo.IsStatic)
Internal\Reflection\Execution\TypeLoader\ConstraintValidatorSupport.cs (1)
290if (!ctor.IsStatic && ctor.IsPublic && ctor.GetParametersAsSpan().Length == 0)
System.Private.Windows.Core.TestUtilities (1)
TestAccessor.cs (1)
80return (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)
436attributes |= mi.IsStatic ? MethodAttributes.Static : MethodAttributes.Virtual; 458if (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)
103_returnType, ModuleBuilderImpl.GetSignatureConvention(_callingConventions), GetGenericArguments().Length, !IsStatic, optionalParameterTypes: null,
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
799GetSignatureConvention(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.ServiceModel.Primitives (5)
System\ServiceModel\Description\ServiceReflector.cs (1)
667foreach (MethodInfo mi in interfaceType.GetRuntimeMethods().Where(m => !m.IsStatic))
System\ServiceModel\Description\TypeLoader.cs (4)
135foreach (MethodInfo methodInfo in aParentType.GetRuntimeMethods().Where(m => !m.IsStatic)) 700foreach (MethodInfo methodInfo in contractToGetMethodsFrom.GetRuntimeMethods().Where(m => !m.IsStatic)) 1355if (getMethod != null && (getMethod.IsStatic || IsMethodOverriding(getMethod))) 1360if (setMethod != null && (setMethod.IsStatic || IsMethodOverriding(setMethod)))
System.Text.Json (6)
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (3)
80Debug.Assert(!constructor.IsStatic); 190Debug.Assert(!constructor.IsStatic); 250Debug.Assert(!constructor.IsStatic);
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (3)
50Debug.Assert(constructor.DeclaringType == type && !constructor.IsStatic); 80Debug.Assert(constructor.DeclaringType == type && !constructor.IsStatic); 140Debug.Assert(constructor.DeclaringType == type && !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)