93 references to SetMethod
dotnet-svcutil-lib (7)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (2)
1145return propertyInfo.SetMethod != null && propertyInfo.SetMethod.IsPublic;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (2)
965MethodInfo setMethod = property.SetMethod; 1030MethodInfo setMethod = property.SetMethod;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (1)
754MethodInfo setMethod = property.SetMethod;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataMember.cs (1)
347MethodInfo setMethod = property.SetMethod;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (1)
280if (publicProperty != null && publicProperty.SetMethod != null)
Microsoft.AspNetCore.Components (6)
PersistentState\PersistentServicesRegistry.cs (2)
186if (propertyInfo.SetMethod == null || !propertyInfo.SetMethod.IsPublic)
Reflection\ComponentProperties.cs (2)
310if (parameterAttribute != null && (propertyInfo.SetMethod == null || !propertyInfo.SetMethod.IsPublic))
Reflection\PropertySetter.cs (2)
23if (property.SetMethod == null) 32var setMethod = property.SetMethod;
Microsoft.AspNetCore.Components.Endpoints (3)
FormMapping\Metadata\FormDataMetadataFactory.cs (2)
217if (property.SetMethod == null || !property.SetMethod.IsPublic)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
277var setMethod = propertyInfo.SetMethod;
Microsoft.AspNetCore.Http.Abstractions (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
277var setMethod = propertyInfo.SetMethod;
Microsoft.AspNetCore.Http.Extensions (2)
src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (2)
217if (property.SetMethod == null || !property.SetMethod.IsPublic)
Microsoft.AspNetCore.Mvc.Core (5)
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (1)
374propertyHelper.Property.SetMethod?.IsPublic == true &&
src\Shared\PropertyActivator\PropertyActivator.cs (3)
91property.SetMethod != null && 92!property.SetMethod.IsStatic; 97properties = properties.Where(property => property.SetMethod is { IsPublic: true });
src\Shared\PropertyHelper\PropertyHelper.cs (1)
277var setMethod = propertyInfo.SetMethod;
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Filters\SaveTempDataPropertyFilterBase.cs (2)
122if (!(property.SetMethod != null && 123property.SetMethod.IsPublic &&
Microsoft.AspNetCore.Routing (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
277var setMethod = propertyInfo.SetMethod;
Microsoft.AspNetCore.Routing.Abstractions (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
277var setMethod = propertyInfo.SetMethod;
Microsoft.AspNetCore.Shared.Tests (4)
src\Shared\PropertyActivator\PropertyActivator.cs (3)
91property.SetMethod != null && 92!property.SetMethod.IsStatic; 97properties = properties.Where(property => property.SetMethod is { IsPublic: true });
src\Shared\PropertyHelper\PropertyHelper.cs (1)
277var setMethod = propertyInfo.SetMethod;
Microsoft.CodeAnalysis (2)
InternalUtilities\UICultureUtilities.cs (2)
32var currentUICultureSetter = type.GetTypeInfo().GetDeclaredProperty(currentUICultureName)?.SetMethod; 78var currentUICultureSetter = typeInfo.GetDeclaredProperty(currentUICultureName)?.SetMethod;
Microsoft.CodeAnalysis.Scripting (1)
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (1)
391var setter = property.SetMethod;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\InternalUtilities\UICultureUtilities.cs (2)
32var currentUICultureSetter = type.GetTypeInfo().GetDeclaredProperty(currentUICultureName)?.SetMethod; 78var currentUICultureSetter = typeInfo.GetDeclaredProperty(currentUICultureName)?.SetMethod;
Microsoft.CSharp (3)
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (3)
1259if (property.GetMethod != null || property.SetMethod != null) 1261MethodInfo accessor = property.GetMethod ?? property.SetMethod; // Must have at least one. 1270MethodInfo methSet = property.SetMethod;
Microsoft.Extensions.Configuration.Binder (4)
ConfigurationBinder.cs (4)
278property.SetMethod is null || 279(!options.BindNonPublicProperties && (!property.GetMethod.IsPublic || !property.SetMethod.IsPublic)) || 302isReadOnly: property.SetMethod is null || (!property.SetMethod.IsPublic && !options.BindNonPublicProperties));
Microsoft.Maui.Controls (7)
BindingExpression.cs (4)
278 if (pi.CanWrite && pi.SetMethod.ReturnType == typeof(int)) 291 if (pi.CanWrite && pi.SetMethod.ReturnType == typeof(string)) 302 if (pi.CanWrite && pi.SetMethod.ReturnType == typeof(object)) 399 if (property is { CanWrite: true, SetMethod: { IsPublic: true, IsStatic: false } propertySetMethod })
PlatformBindingHelpers.cs (1)
84 var mi = target.GetType().GetProperty(targetProperty)?.SetMethod;
Shell\ShellContent.cs (2)
391 if (prop != null && prop.CanWrite && prop.SetMethod.IsPublic) 411 if (prop != null && prop.CanWrite && prop.SetMethod.IsPublic)
Microsoft.Maui.Controls.Xaml (3)
ApplyPropertiesVisitor.cs (1)
662 if (propertyInfo == null || !propertyInfo.CanWrite || (setter = propertyInfo.SetMethod) == null)
MarkupExtensionParser.cs (2)
76 setter = t.GetRuntimeProperty(prop).SetMethod; 87 setter = markupExtension.GetType().GetRuntimeProperty(prop).SetMethod;
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (2)
143(p.GetMethod != null && p.GetMethod.IsPublic) || (p.SetMethod != null && p.SetMethod.IsPublic);
System.Composition.Hosting (3)
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (3)
55prop.SetMethod != null && prop.SetMethod.IsPublic && !prop.SetMethod.IsStatic))
System.Composition.TypedParts (2)
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (2)
31.Where(pi => pi.CanWrite && pi.SetMethod.IsPublic && !(pi.SetMethod.IsStatic))
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\DsesFilterAndTransform.cs (1)
790else if (propertyInfo.GetMethod?.IsStatic == true || propertyInfo.SetMethod?.IsStatic == true)
System.Private.DataContractSerialization (6)
System\Runtime\Serialization\AccessorBuilder.cs (2)
192var setMethod = propInfo.SetMethod!.CreateDelegate<StructSetDelegate<DeclaringType, PropertyType>>(); 203var setMethod = propInfo.SetMethod!.CreateDelegate<Action<DeclaringType, PropertyType>>();
System\Runtime\Serialization\ClassDataContract.cs (2)
835MethodInfo? setMethod = property.SetMethod; 900MethodInfo? setMethod = property.SetMethod;
System\Runtime\Serialization\CodeGenerator.cs (1)
620MethodInfo? setMethod = property.SetMethod;
System\Runtime\Serialization\DataMember.cs (1)
282MethodInfo? setMethod = property.SetMethod;
System.Private.Xml (12)
System\Xml\Serialization\CodeGenerator.cs (2)
517result = currentProperty.SetMethod; 624MethodInfo? setMethod = property.SetMethod ?? GetPropertyMethodFromBaseType(property, false);
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (6)
1663if (!isList && pi != null && pi.SetMethod != null && !pi.SetMethod.IsPublic) 1671else if (isList && pi != null && (pi.SetMethod == null || !pi.SetMethod.IsPublic)) 1683if (pi.SetMethod != null && !pi.SetMethod.IsPublic)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (2)
1490if (memberInfo is PropertyInfo propInfo && propInfo.SetMethod == null) 1498if (mi is PropertyInfo pi && pi.SetMethod != null && pi.PropertyType == propInfo.PropertyType)
System\Xml\Serialization\Types.cs (2)
1116return propertyInfo.SetMethod != null && propertyInfo.SetMethod.IsPublic;
System.Reflection.DispatchProxy (4)
System\Reflection\DispatchProxyGenerator.cs (4)
325var ai = new PropertyAccessorInfo(pi.GetMethod, pi.SetMethod); 328if (pi.SetMethod != null) 329propertyMap[pi.SetMethod] = ai; 375PropertyAccessorInfo ai = propertyMap[pi.GetMethod ?? pi.SetMethod!];
System.Reflection.Emit (2)
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
282if (property.SetMethod is MethodBuilderImpl sMb)
System\Reflection\Emit\TypeBuilderImpl.cs (1)
993MethodInfo? setMethod = property.SetMethod;
System.Reflection.MetadataLoadContext (2)
System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs (1)
85property.GetMethod ?? property.SetMethod;
System\Reflection\TypeLoading\Properties\RoProperty.cs (1)
107public sealed override bool CanWrite => SetMethod != null;
System.Text.Json (5)
src\libraries\System.Text.Json\Common\ReflectionExtensions.cs (1)
221return propertyInfo.GetMethod?.IsVirtual == true || propertyInfo.SetMethod?.IsVirtual == true;
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
167propertyInfo.SetMethod?.IsPublic == true || 423MethodInfo? setMethod = propertyInfo.SetMethod;
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (1)
281MethodInfo? realMethod = propertyInfo.SetMethod;
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (1)
155MethodInfo setMethodInfo = propertyInfo.SetMethod!;