181 references to ParameterAttributes
dotnet-svcutil-lib (1)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (1)
94_methodBuilder.DefineParameter(arg.Index, ParameterAttributes.None, arg.Name);
Microsoft.AspNetCore.Http.Extensions (3)
RequestDelegateFactory.cs (2)
714if (parameter.Attributes.HasFlag(ParameterAttributes.In)) 718else if (parameter.Attributes.HasFlag(ParameterAttributes.Out))
src\Shared\PropertyAsParameterInfo.cs (1)
27AttrsImpl = (ParameterAttributes)propertyInfo.Attributes;
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
src\Shared\PropertyAsParameterInfo.cs (1)
27AttrsImpl = (ParameterAttributes)propertyInfo.Attributes;
Microsoft.AspNetCore.OpenApi (1)
src\Shared\PropertyAsParameterInfo.cs (1)
27AttrsImpl = (ParameterAttributes)propertyInfo.Attributes;
Microsoft.CodeAnalysis (8)
MetadataReader\PEModule.cs (1)
3507out ParameterAttributes flags)
PEWriter\MetadataWriter.cs (7)
1200public static ParameterAttributes GetParameterAttributes(IParameterDefinition parDef) 1202ParameterAttributes result = 0; 1205result |= ParameterAttributes.In; 1210result |= ParameterAttributes.Out; 1215result |= ParameterAttributes.Optional; 1220result |= ParameterAttributes.HasDefault; 1225result |= ParameterAttributes.HasFieldMarshal;
Microsoft.CodeAnalysis.CSharp (14)
Symbols\Metadata\PE\PEParameterSymbol.cs (14)
157private readonly ParameterAttributes _flags; 289ParameterAttributes inOutFlags = _flags & (ParameterAttributes.Out | ParameterAttributes.In); 291if (inOutFlags == ParameterAttributes.Out) 499internal ParameterAttributes Flags 544return (_flags & ParameterAttributes.HasDefault) != 0; 560if ((_flags & ParameterAttributes.HasDefault) != 0) 619return (_flags & ParameterAttributes.Optional) != 0; 973get { return (_flags & ParameterAttributes.In) != 0; } 978get { return (_flags & ParameterAttributes.Out) != 0; } 985return (_flags & ParameterAttributes.HasFieldMarshal) != 0; 1002if ((_flags & ParameterAttributes.HasFieldMarshal) == 0) 1016if ((_flags & ParameterAttributes.HasFieldMarshal) == 0)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (35)
Attributes\AttributeTests_WellKnownAttributes.cs (35)
520Assert.Equal(ParameterAttributes.HasDefault, theParameter.Flags); // native compiler has None instead 1094Assert.Equal(ParameterAttributes.Optional | ParameterAttributes.HasDefault, param.Attributes); 1156ParameterAttributes expectedFlags; 1166expectedFlags = ParameterAttributes.Optional | ParameterAttributes.HasDefault; 2142ParameterAttributes expectedFlags; 2154expectedFlags = ParameterAttributes.In; 2161expectedFlags = ParameterAttributes.Out; 2167expectedFlags = ParameterAttributes.In | ParameterAttributes.Out; 2171expectedFlags = ParameterAttributes.In | ParameterAttributes.HasDefault | ParameterAttributes.Optional; 2175expectedFlags = ParameterAttributes.Out | ParameterAttributes.HasDefault | ParameterAttributes.Optional; 2179expectedFlags = ParameterAttributes.In | ParameterAttributes.Out | ParameterAttributes.HasDefault | ParameterAttributes.Optional; 2321ParameterAttributes expectedFlags; 2335expectedFlags = ParameterAttributes.In; 2341expectedFlags = ParameterAttributes.Out; 2345expectedFlags = ParameterAttributes.In | ParameterAttributes.Out; 2376ParameterAttributes expectedFlags; 2386expectedFlags = ParameterAttributes.In; 2390expectedFlags = ParameterAttributes.Out; 2394expectedFlags = ParameterAttributes.In | ParameterAttributes.Out; 2431Assert.Equal(ParameterAttributes.In | ParameterAttributes.Out, metadataReader.GetParameter(ps[0]).Attributes); 2432Assert.Equal(ParameterAttributes.In | ParameterAttributes.Out, metadataReader.GetParameter(ps[1]).Attributes);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
Debugger\Engine\DkmClrModuleInstance.cs (1)
396int IMetadataImport.GetParamProps(Token tk, out Token pmd, out uint pulSequence, char[] szName, uint cchName, out uint pchName, out ParameterAttributes pdwAttr, out uint pdwCPlusTypeFlag, out MetadataReader.UnusedIntPtr ppValue, out uint pcchValue)
Debugger\MemberInfo\ParameterInfoImpl.cs (1)
25public override System.Reflection.ParameterAttributes Attributes
Microsoft.CodeAnalysis.Test.Utilities (8)
Metadata\MetadataValidation.cs (2)
118Assert.NotEqual(0, (int)(paramRow.Attributes & ParameterAttributes.HasFieldMarshal)); 130Assert.Equal(0, (int)(paramRow.Attributes & ParameterAttributes.HasFieldMarshal));
Platform\Custom\MetadataSignatureHelper.cs (6)
158public static bool AppendParameterAttributes(StringBuilder sb, ParameterAttributes attributes, bool all = true) 162if ((attributes & ParameterAttributes.Optional) != 0) 164if ((attributes & ParameterAttributes.In) != 0) 166if ((attributes & ParameterAttributes.Out) != 0) 171if ((attributes & ParameterAttributes.HasFieldMarshal) != 0) 173if ((attributes & ParameterAttributes.HasDefault) != 0)
Microsoft.CodeAnalysis.VisualBasic (19)
Symbols\Metadata\PE\PEParameterSymbol.vb (14)
28Private ReadOnly _flags As ParameterAttributes 84flags As ParameterAttributes, 105flags As ParameterAttributes, 217flags As ParameterAttributes, 300Friend ReadOnly Property ParamFlags As ParameterAttributes 320Return (_flags And ParameterAttributes.HasDefault) <> 0 334If (_flags And ParameterAttributes.HasDefault) <> 0 Then 354Return (_flags And ParameterAttributes.Optional) <> 0 441Return (_flags And ParameterAttributes.Optional) <> 0 486Return (_flags And ParameterAttributes.Out) <> 0 492Return (_flags And ParameterAttributes.In) <> 0 516Return (_flags And ParameterAttributes.HasFieldMarshal) <> 0 529If (_flags And ParameterAttributes.HasFieldMarshal) = 0 Then 540If (_flags And ParameterAttributes.HasFieldMarshal) = 0 Then
Symbols\Metadata\PE\PEPropertySymbol.vb (5)
479Dim flags As ParameterAttributes = 0 497If (flags And ParameterAttributes.Optional) <> (setParameter.ParamFlags And ParameterAttributes.Optional) Then 498flags = flags And Not ParameterAttributes.Optional 505flags = flags And Not ParameterAttributes.Optional
Microsoft.CSharp (3)
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (3)
1493if ((parameter.Attributes & ParameterAttributes.Optional) != 0 && !parameter.ParameterType.IsByRef) 1500if ((parameter.Attributes & ParameterAttributes.HasFieldMarshal) != 0) 1528else if ((parameter.Attributes & ParameterAttributes.HasDefault) != 0 && !parameter.ParameterType.IsByRef)
Microsoft.Extensions.AI.Tests (1)
Functions\AIFunctionFactoryTest.cs (1)
1431dynamicMethod.DefineParameter(1, ParameterAttributes.None, "value");
Microsoft.ML.Core (4)
ComponentModel\LoadableClassAttribute.cs (4)
199if ((parm.Attributes & (ParameterAttributes.Out | ParameterAttributes.Retval)) != 0) 219if ((parm.Attributes & (ParameterAttributes.Out | ParameterAttributes.Retval)) != 0)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
482[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.ParameterAttributes))]
netstandard (1)
netstandard.cs (1)
1450[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.ParameterAttributes))]
System.Diagnostics.StackTrace (1)
System\Diagnostics\SymbolStore\ISymbolWriter.cs (1)
108ParameterAttributes attributes,
System.Linq.Expressions (2)
System\Dynamic\Utils\TypeExtensions.cs (2)
91return (pi.Attributes & ParameterAttributes.Out) == ParameterAttributes.Out;
System.Private.CoreLib (35)
LibraryImports.g.cs (2)
1040internal static partial int SetParamInfo(global::System.Runtime.CompilerServices.QCallModule module, int tkMethod, int iSequence, global::System.Reflection.ParameterAttributes iParamAttributes, string strParamName) 1052static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tkMethod_native, int __iSequence_native, global::System.Reflection.ParameterAttributes __iParamAttributes_native, ushort* __strParamName_native);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ConstructorBuilder.cs (2)
20public ParameterBuilder DefineParameter(int iSequence, ParameterAttributes attributes, string strParamName) 23protected abstract ParameterBuilder DefineParameterCore(int iSequence, ParameterAttributes attributes, string strParamName);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (1)
385public ParameterBuilder? DefineParameter(int position, ParameterAttributes attributes, string? parameterName)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilder.cs (2)
34public ParameterBuilder DefineParameter(int position, ParameterAttributes attributes, string? strParamName) 41protected abstract ParameterBuilder DefineParameterCore(int position, ParameterAttributes attributes, string? strParamName);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ParameterBuilder.cs (6)
14public bool IsIn => ((ParameterAttributes)Attributes & ParameterAttributes.In) != 0; 15public bool IsOptional => ((ParameterAttributes)Attributes & ParameterAttributes.Optional) != 0; 16public bool IsOut => ((ParameterAttributes)Attributes & ParameterAttributes.Out) != 0;
src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (7)
19public virtual ParameterAttributes Attributes => AttrsImpl; 25public bool IsIn => (Attributes & ParameterAttributes.In) != 0; 26public bool IsLcid => (Attributes & ParameterAttributes.Lcid) != 0; 27public bool IsOptional => (Attributes & ParameterAttributes.Optional) != 0; 28public bool IsOut => (Attributes & ParameterAttributes.Out) != 0; 29public bool IsRetval => (Attributes & ParameterAttributes.Retval) != 0; 110protected ParameterAttributes AttrsImpl;
src\System\Reflection\Emit\RuntimeConstructorBuilder.cs (2)
125protected override ParameterBuilder DefineParameterCore(int iSequence, ParameterAttributes attributes, string? strParamName) 132attributes &= ~ParameterAttributes.ReservedMask;
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (2)
641protected override ParameterBuilder DefineParameterCore(int position, ParameterAttributes attributes, string? strParamName) 649attributes &= ~ParameterAttributes.ReservedMask;
src\System\Reflection\Emit\RuntimeParameterBuilder.cs (2)
32ParameterAttributes attributes, 61private readonly ParameterAttributes _attributes;
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (1)
117ParameterAttributes iParamAttributes, string? strParamName);
src\System\Reflection\MdImport.cs (2)
481public void GetParamDefProps(int parameterToken, out int sequence, out ParameterAttributes attributes) 484attributes = (ParameterAttributes)attributesRaw;
src\System\Reflection\RuntimeParameterInfo.cs (6)
67scope.GetParamDefProps(tkParamDef, out int position, out ParameterAttributes attr); 94returnParameter ??= new RuntimeParameterInfo(sig, default, 0, -1, (ParameterAttributes)0, member); 105args[i] = new RuntimeParameterInfo(sig, default, 0, i, (ParameterAttributes)0, member); 142internal void SetAttributes(ParameterAttributes attributes) 181int position, ParameterAttributes attributes, MemberInfo member) 207AttrsImpl = ParameterAttributes.None;
System.Private.Xml (3)
System\Xml\Serialization\CodeGenerator.cs (1)
102_methodBuilder!.DefineParameter(arg.Index, ParameterAttributes.None, arg.Name);
System\Xml\Xsl\IlGen\XmlILModule.cs (2)
159methBldr.DefineParameter(1, ParameterAttributes.None, RuntimeName); 164methBldr.DefineParameter(i + (isRaw ? 1 : 2), ParameterAttributes.None, paramNames[i]);
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingParameterInfo.cs (1)
18public override ParameterAttributes Attributes
System.Reflection.Emit (14)
System\Reflection\Emit\ConstructorBuilderImpl.cs (1)
28protected override ParameterBuilder DefineParameterCore(int iSequence, ParameterAttributes attributes, string strParamName) =>
System\Reflection\Emit\MethodBuilderImpl.cs (4)
130protected override ParameterBuilder DefineParameterCore(int position, ParameterAttributes attributes, string? strParamName) 141attributes &= ~ParameterAttributes.ReservedMask; 256return new ParameterInfoWrapper(new ParameterBuilderImpl(this, 0, ParameterAttributes.Retval, null), _returnType); 299parameters[i] = new ParameterInfoWrapper(new ParameterBuilderImpl(this, i, ParameterAttributes.None, null), _parameterTypes[i]);
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
973attributes: (ParameterAttributes)parameter.Attributes,
System\Reflection\Emit\ParameterBuilderImpl.cs (8)
13internal ParameterAttributes _attributes; 19public ParameterBuilderImpl(MethodBuilderImpl methodBuilder, int sequence, ParameterAttributes attributes, string? paramName) 36_attributes |= ParameterAttributes.HasDefault; 44_attributes |= ParameterAttributes.In; 47_attributes |= ParameterAttributes.Out; 50_attributes |= ParameterAttributes.Optional; 53_attributes |= ParameterAttributes.HasFieldMarshal; 78public override ParameterAttributes Attributes => _pb._attributes;
System.Reflection.Metadata (5)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (2)
795/// <param name="attributes"><see cref="ParameterAttributes"/></param> 799public ParameterHandle AddParameter(ParameterAttributes attributes, StringHandle name, int sequenceNumber)
System\Reflection\Metadata\Internal\Tables.cs (2)
533internal ParameterAttributes GetFlags(ParameterHandle handle) 536return (ParameterAttributes)this.Block.PeekUInt16(rowOffset + _FlagsOffset);
System\Reflection\Metadata\TypeSystem\Parameter.cs (1)
24public ParameterAttributes Attributes
System.Reflection.MetadataLoadContext (15)
System\Reflection\TypeLoading\Parameters\Ecma\EcmaFatMethodParameter.cs (1)
36protected sealed override ParameterAttributes ComputeAttributes() => Parameter.Attributes;
System\Reflection\TypeLoading\Parameters\RoFatMethodParameter.cs (10)
25public sealed override ParameterAttributes Attributes => (_lazyParameterAttributes == ParameterAttributesSentinel) ? (_lazyParameterAttributes = ComputeAttributes()) : _lazyParameterAttributes; 26protected abstract ParameterAttributes ComputeAttributes(); 27private const ParameterAttributes ParameterAttributesSentinel = (ParameterAttributes)(-1); 28private volatile ParameterAttributes _lazyParameterAttributes = ParameterAttributesSentinel; 37ParameterAttributes attributes = Attributes; 38if (0 != (attributes & ParameterAttributes.In)) 45if (0 != (attributes & ParameterAttributes.Out)) 52if (0 != (attributes & ParameterAttributes.Optional)) 59if (0 != (attributes & ParameterAttributes.HasFieldMarshal))
System\Reflection\TypeLoading\Parameters\RoParameter.cs (1)
31public abstract override ParameterAttributes Attributes { get; }
System\Reflection\TypeLoading\Parameters\RoPropertyIndexParameter.cs (1)
29public sealed override ParameterAttributes Attributes => _backingParameter.Attributes;
System\Reflection\TypeLoading\Parameters\RoThinMethodParameter.cs (2)
23public sealed override ParameterAttributes Attributes => ParameterAttributes.None;
System.Reflection.Primitives (1)
artifacts\obj\System.Reflection.Primitives\Debug\net11.0\System.Reflection.Primitives.Forwards.cs (1)
16[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.ParameterAttributes))]
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net11.0\System.Runtime.Forwards.cs (1)
494[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.ParameterAttributes))]
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\ComImportInteropInterfaceDetailsStrategy.cs (1)
148cb.DefineParameter(1, ParameterAttributes.None, "assemblyName");