143 references to IsPublic
dotnet-svcutil-lib (6)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (2)
1145return propertyInfo.SetMethod != null && propertyInfo.SetMethod.IsPublic; 1260if (!ctor.IsPublic)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (1)
1038if (!setMethod.IsPublic || IsMethodOverriding(setMethod))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (2)
2238return ctor != null && !ctor.IsPublic && !IsMemberVisibleInSerializationModule(ctor); 2249return method != null && !method.IsPublic && !IsMemberVisibleInSerializationModule(method);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlDataContract.cs (1)
420if (!ctor.IsPublic && type.FullName == "System.Xml.Linq.XElement")
Microsoft.AspNetCore.Components (3)
PersistentState\PersistentServicesRegistry.cs (2)
186if (propertyInfo.SetMethod == null || !propertyInfo.SetMethod.IsPublic) 192if (propertyInfo.GetMethod == null || !propertyInfo.GetMethod.IsPublic)
Reflection\ComponentProperties.cs (1)
310if (parameterAttribute != null && (propertyInfo.SetMethod == null || !propertyInfo.SetMethod.IsPublic))
Microsoft.AspNetCore.Components.Endpoints (2)
FormMapping\Metadata\FormDataMetadataFactory.cs (1)
217if (property.SetMethod == null || !property.SetMethod.IsPublic)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
544property.GetMethod.IsPublic &&
Microsoft.AspNetCore.Http.Abstractions (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
544property.GetMethod.IsPublic &&
Microsoft.AspNetCore.Http.Extensions (1)
src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (1)
217if (property.SetMethod == null || !property.SetMethod.IsPublic)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (3)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (3)
17&& type.DeclaredConstructors.Any(c => c.IsPublic || c.IsFamily || c.IsFamilyOrAssembly) 20from method in type.DeclaredMethods.Where(m => m.IsPublic && !m.IsStatic) 40from method in type.DeclaredMethods.Where(m => m.IsPublic)
Microsoft.AspNetCore.Identity.InMemory.Test (3)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (3)
17&& type.DeclaredConstructors.Any(c => c.IsPublic || c.IsFamily || c.IsFamilyOrAssembly) 20from method in type.DeclaredMethods.Where(m => m.IsPublic && !m.IsStatic) 40from method in type.DeclaredMethods.Where(m => m.IsPublic)
Microsoft.AspNetCore.Identity.Test (3)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (3)
17&& type.DeclaredConstructors.Any(c => c.IsPublic || c.IsFamily || c.IsFamilyOrAssembly) 20from method in type.DeclaredMethods.Where(m => m.IsPublic && !m.IsStatic) 40from method in type.DeclaredMethods.Where(m => m.IsPublic)
Microsoft.AspNetCore.Mvc.Core (5)
ApplicationModels\DefaultApplicationModelProvider.cs (1)
459return methodInfo.IsPublic;
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (2)
367if (propertyHelper.Property.CanRead && propertyHelper.Property.GetMethod?.IsPublic == true) 374propertyHelper.Property.SetMethod?.IsPublic == true &&
src\Shared\PropertyActivator\PropertyActivator.cs (1)
97properties = properties.Where(property => property.SetMethod is { IsPublic: true });
src\Shared\PropertyHelper\PropertyHelper.cs (1)
544property.GetMethod.IsPublic &&
Microsoft.AspNetCore.Mvc.Core.Test (1)
ControllerBaseTest.cs (1)
33.Where(method => method.IsPublic &&
Microsoft.AspNetCore.Mvc.RazorPages (1)
ApplicationModels\DefaultPageApplicationModelPartsProvider.cs (1)
183if (!methodInfo.IsPublic)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Filters\SaveTempDataPropertyFilterBase.cs (2)
123property.SetMethod.IsPublic && 125property.GetMethod.IsPublic))
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
ControllerTest.cs (1)
26.Where(method => method.IsPublic &&
Microsoft.AspNetCore.Routing (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
544property.GetMethod.IsPublic &&
Microsoft.AspNetCore.Routing.Abstractions (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
544property.GetMethod.IsPublic &&
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\PropertyActivator\PropertyActivator.cs (1)
97properties = properties.Where(property => property.SetMethod is { IsPublic: true });
src\Shared\PropertyHelper\PropertyHelper.cs (1)
544property.GetMethod.IsPublic &&
Microsoft.CodeAnalysis.Scripting (2)
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (2)
395getter.IsPublic || getter.IsFamily || getter.IsFamilyOrAssembly || 396(setter != null && (setter.IsPublic || setter.IsFamily || setter.IsFamilyOrAssembly))))
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Options\OptionsTestInfo.cs (1)
61var isPublic = type.IsPublic && (isBackingField ? type.GetProperty(unmangledName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static)!.GetMethod!.IsPublic : field.IsPublic);
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
1402if (member.IsPublic)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
HelperFactory.cs (2)
58if (!method.IsPublic) 84if (!method.IsPublic)
Microsoft.Extensions.Configuration.Binder (4)
ConfigurationBinder.cs (4)
279(!options.BindNonPublicProperties && (!property.GetMethod.IsPublic || !property.SetMethod.IsPublic)) || 294(!options.BindNonPublicProperties && !property.GetMethod.IsPublic) || 302isReadOnly: property.SetMethod is null || (!property.SetMethod.IsPublic && !options.BindNonPublicProperties));
Microsoft.Maui.Controls (8)
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 })
Interactivity\EventTrigger.cs (1)
15 static readonly MethodInfo s_handlerinfo = typeof(EventTrigger).GetRuntimeMethods().Single(mi => mi.Name == "OnEventTriggered" && mi.IsPublic == false);
LegacyLayouts\ConstraintExpression.cs (2)
43 minfo = typeof(View).GetProperties().First(pi => pi.Name == Property && pi.CanRead && pi.GetMethod.IsPublic).GetMethod; 52 minfo = typeof(View).GetProperties().First(pi => pi.Name == Property && pi.CanRead && pi.GetMethod.IsPublic).GetMethod;
Shell\ShellContent.cs (2)
391 if (prop != null && prop.CanWrite && prop.SetMethod.IsPublic) 411 if (prop != null && prop.CanWrite && prop.SetMethod.IsPublic)
TypeConversionHelper.cs (1)
138 && method.IsPublic
Microsoft.Maui.Controls.Xaml (5)
ApplyPropertiesVisitor.cs (1)
721 if (method.IsPublic)
CreateValuesVisitor.cs (4)
75 ci.IsPublic && ci.GetParameters().Length != 0 && 81 else if (!type.GetTypeInfo().DeclaredConstructors.Any(ci => ci.IsPublic && ci.GetParameters().Length == 0) && 209 ci.GetParameters().Length != 0 && ci.IsPublic && 235 ci.GetParameters().Length != 0 && ci.IsPublic &&
Microsoft.ML.Core (3)
ComponentModel\ComponentCatalog.cs (3)
31if (methodInfo.IsPublic) 48if (constructorInfo.IsPublic) 655if (!meth.IsPublic || !meth.IsStatic)
Microsoft.ML.Transforms (1)
Expression\LambdaBinder.cs (1)
1163if (!meth.IsStatic || !meth.IsPublic && !isIdent)
Microsoft.VisualBasic.Core (3)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (1)
549If method.IsPublic Then
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (2)
2290Return DirectCast(Member, MethodInfo).IsPublic 2296Return DirectCast(Member, ConstructorInfo).IsPublic
PresentationBuildTasks (2)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (2)
1051allowed = mi.IsPublic; 1160return (mi != null && mi.IsPublic);
PresentationFramework (11)
MS\Internal\Data\PropertyPathWorker.cs (1)
1625if (setter == null || setter.IsPublic)
System\Windows\Markup\XamlTypeMapper.cs (10)
885Debug.Assert(attachedPropertyInfo.IsPublic || 1104return (mi != null && mi.IsPublic); 1112return (mi != null && mi.IsPublic); 1124isPublic = mi != null && mi.IsPublic && ReflectionHelper.IsPublicType(mi.DeclaringType); 1125return (mi != null && (mi.IsPublic || mi.IsAssembly || mi.IsFamilyOrAssembly || isProtected)); 1137isPublic = mi != null && mi.IsPublic && ReflectionHelper.IsPublicType(mi.DeclaringType); 1138return (mi != null && (mi.IsPublic || mi.IsAssembly || mi.IsFamilyOrAssembly || isProtected)); 1150isPublic = mi != null && mi.IsPublic && ReflectionHelper.IsPublicType(mi.DeclaringType); 1151return (mi != null && (mi.IsPublic || mi.IsAssembly || mi.IsFamilyOrAssembly || isProtected)); 1160return (mi != null && mi.IsPublic);
System.ComponentModel.Annotations (4)
System\ComponentModel\DataAnnotations\LocalizableString.cs (1)
142if (getter == null || !(getter.IsPublic && getter.IsStatic))
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (1)
274if (propertyGetter == null || (!propertyGetter.IsAssembly && !propertyGetter.IsPublic))
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (2)
143(p.GetMethod != null && p.GetMethod.IsPublic) || (p.SetMethod != null && p.SetMethod.IsPublic);
System.ComponentModel.Composition (2)
Microsoft\Internal\ReflectionServices.cs (2)
29return constructor.DeclaringType!.IsVisible && constructor.IsPublic; 44if (!method.IsPublic)
System.ComponentModel.TypeConverter (2)
System\ComponentModel\ReflectTypeDescriptionProvider.cs (2)
1283if (getMethod != null && !getMethod.IsStatic && getMethod.IsPublic) 1287if (setMethod != null && (setMethod.IsStatic || !setMethod.IsPublic))
System.Composition.Hosting (4)
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (4)
31return ci.IsPublic && ps.Length == 1 && ps[0].ParameterType == typeof(IDictionary<string, object>); 43var parameterlessConstructor = ti.DeclaredConstructors.SingleOrDefault(ci => ci.IsPublic && ci.GetParameters().Length == 0); 54prop.GetMethod != null && prop.GetMethod.IsPublic && !prop.GetMethod.IsStatic && 55prop.SetMethod != null && prop.SetMethod.IsPublic && !prop.SetMethod.IsStatic))
System.Composition.TypedParts (7)
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\ContractHelpers.cs (1)
73.Where(p => p.GetMethod.IsPublic && p.DeclaringType == attrType && p.CanRead))
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.Linq.Expressions (4)
System\Linq\Expressions\MethodCallExpression.cs (4)
1315if (method == null || (!method.IsPublic && moo.IsPublic)) 1321else if (method.IsPublic == moo.IsPublic)
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TypeAnalysis.cs (1)
49if (getterInfo.IsStatic || !getterInfo.IsPublic)
src\System\Reflection\Associates.cs (1)
29if (associate.IsPublic)
src\System\RuntimeHandles.cs (2)
230Debug.Assert(type.GetConstructor(Type.EmptyTypes) is ConstructorInfo c && c.IsPublic, 254Debug.Assert(type.GetConstructor(Type.EmptyTypes) is ConstructorInfo c && c.IsPublic,
System.Private.DataContractSerialization (6)
System\Runtime\Serialization\ClassDataContract.cs (3)
172if (ci.IsPublic) 908if (!setMethod.IsPublic || IsMethodOverriding(setMethod)) 1080if (method.Name == Globals.ExtensionDataSetExplicitMethod || !method.IsPublic)
System\Runtime\Serialization\DataContract.cs (2)
2163return ctor != null && !ctor.IsPublic && !IsMemberVisibleInSerializationModule(ctor); 2174return method != null && !method.IsPublic && !IsMemberVisibleInSerializationModule(method);
System\Runtime\Serialization\XmlDataContract.cs (1)
303if (!ctor.IsPublic && type.FullName == "System.Xml.Linq.XElement")
System.Private.Xml (8)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (3)
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\Types.cs (4)
1116return propertyInfo.SetMethod != null && propertyInfo.SetMethod.IsPublic; 1208if (info.GetMethod != null && !info.GetMethod!.IsPublic 1210&& ((PropertyInfo)memberInfoToBeReplaced).GetMethod!.IsPublic 1250if (!ctor.IsPublic)
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (1)
120if (!publicOnly || methods[i].GetBaseDefinition().IsPublic)
System.Reflection.Context (2)
System\Reflection\Context\Virtual\VirtualPropertyInfo.cs (2)
47Debug.Assert(_getter == null || _getter.IsPublic); 54Debug.Assert(_setter == null || _setter.IsPublic);
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\General\Helpers.cs (1)
85if (accessor.IsPublic)
System.Text.Json (8)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
193if (!typeof(JsonConverter).IsAssignableFrom(converterType) || ctor == null || !ctor.IsPublic)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (4)
166if (propertyInfo.GetMethod?.IsPublic == true || 167propertyInfo.SetMethod?.IsPublic == true || 418if (getMethod != null && (getMethod.IsPublic || useNonPublicAccessors)) 424if (setMethod != null && (setMethod.IsPublic || useNonPublicAccessors))
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (1)
80Debug.Assert(constructor.IsPublic && !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.Windows.Forms.Design (1)
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (1)
124if (methodInfo.IsPublic)
System.Xaml (9)
System\Xaml\Schema\TypeReflector.cs (7)
164return method.IsPublic || method.IsAssembly || method.IsFamilyOrAssembly; 677|| (getters is not null && getters.Count > 0 && UnderlyingType.IsVisible && getters[0].IsPublic && !setters[0].IsPublic)) 814if (accessor.IsPublic && IsAttachablePropertyAccessor(isEvent, isGetter, accessor)) 876if (value.IsPublic) 878if (!list[0].IsPublic) 890if (!list[0].IsPublic)
System\Xaml\XamlMember.cs (2)
626if (getter is not null && !getter.IsPublic) 669if (setter is not null && !setter.IsPublic)
xunit.assert (2)
Sdk\ArgumentFormatter.cs (1)
342 .Where(p => p.GetMethod != null && p.GetMethod.IsPublic && !p.GetMethod.IsStatic)
Sdk\AssertHelper.cs (1)
154 && p.GetMethod.IsPublic