You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c112874
Browse filesBrowse the repository at this point in the historyBrowse files
Make ParameterData properties public for external access
Converted internal properties and methods in ParameterData to public, enabling external access to parameter metadata (type handles, position, default value, attributes, member data, etc.). Removed GetParameterInfo() in favor of direct property access. Updated ParameterList and WellKnownParameterDescriptor to use the new public ParameterInfo property. Internal helper methods are now private. This improves visibility and usability of parameter metadata across the codebase.
=>_declaringTypeHandle??=GetParameterInfo().Member.DeclaringType?.TypeHandle??thrownewNotSupportedException($"The underlying '{typeof(ParameterInfo).FullName}' belongs to a member that does not return a declaring type.");
58
+
publicRuntimeTypeHandleDeclaringTypeHandle
59
+
=>_declaringTypeHandle??=ParameterInfo.Member.DeclaringType?.TypeHandle??thrownewNotSupportedException($"The underlying '{typeof(ParameterInfo).FullName}' belongs to a member that does not return a declaring type.");
/// Gets a value indicating whether the current type is passed by reference using the <see langword="ref"/> keyword.
69
66
/// </summary>
70
67
/// <value><see langword="true"/> if the parameter is passed by reference using the <c>ref</c> keyword; otherwise, <see langword="false"/>.</value>
71
-
internalboolIsRef
68
+
publicboolIsRef
72
69
=>_isRef??=IsRefInternal(this);
73
70
74
71
/// <summary>
75
72
/// Gets a value indicating whether the current instance is marked as <see langword="ref"/> <see langword="readonly"/>.
76
73
/// </summary>
77
74
/// <value><see langword="true"/> if the parameter is marked as <see langword="ref"/> <see langword="readonly"/>; otherwise, <see langword="false"/>.</value>
78
-
internalboolIsRefReadOnly
75
+
publicboolIsRefReadOnly
79
76
=>_isRefReadOnly??=IsRefReadOnlyInternal(this);
80
77
81
78
/// <summary>
82
79
/// Gets a value indicating whether the parameter is an input parameter (passed by reference using the <see langword="in"/> keyword).
83
80
/// </summary>
84
81
/// <value><see langword="true"/> if the parameter is an input parameter; otherwise, <see langword="false"/>.</value>
85
-
internalboolIsIn
82
+
publicboolIsIn
86
83
=>_isIn??=IsInParameter(this);
87
84
88
85
/// <summary>
89
86
/// Gets a value indicating whether the parameter is an output parameter (passed by reference using the <see langword="out"/> keyword.
90
87
/// </summary>
91
88
/// <value><see langword="true"/> if the parameter is an output parameter; otherwise, <see langword="false"/>.</value>
92
-
internalboolIsOut
89
+
publicboolIsOut
93
90
=>_isOut??=IsOutParameter(this);
94
91
95
92
/// <summary>
@@ -98,23 +95,23 @@ internal bool IsOut
98
95
/// <value><see langword="true"/> if the parameter is optional i.e. has a default value; otherwise, <see langword="false"/>.</value>
99
96
/// <remarks>This property does not return whether the parameter is decorated with the <see cref="System.Runtime.InteropServices.OptionalAttribute"/>.
100
97
/// It only checks whether the parameter is considered optional by the existence of a default value by reading <see cref="System.Reflection.ParameterInfo.HasDefaultValue"/>.</remarks>
/// Gets the member (method, constructor, or property accessor) that declares this parameter.
@@ -169,8 +166,8 @@ internal bool IsParams
169
166
/// belongs to an indexer property (getter or setter) or the setter of a non-indexer property.<para/>
170
167
/// If parameter association for indexer properties matters, then always obtain parameters directly from the getter or setter method (e.g. <see cref="MethodData.Parameters"/> like <c>PropertyData.PropertySetMethodData.Parameters</c>) and completely avoid <see cref="PropertyData.IndexerParameters"/> (or <see cref="PropertyInfo.GetIndexParameters"/>).</remarks>
171
168
/// <value>The <see cref="ParameterizedMemberData"/> (which is either a <see cref="MethodData"/> or <see cref="ConstructorData"/>) that declares this parameter.</value>
/// compiler-generated parameter named 'value' as the last parameter in the method signature.
232
229
/// </remarks>
233
230
/// <value><see langword="true"/> if the parameter is the implicit 'value' parameter of a property or indexer setter; otherwise, <see langword="false"/>.</value>
234
-
internalboolIsSetterValueParameter
231
+
publicboolIsSetterValueParameter
235
232
=>IsPropertySetterParameter// No-indexer property setter always has a single "value" parameter
236
233
||(Name.Equals("value",StringComparison.Ordinal)// "value" parameter is always named "value"
237
234
&&Position==MemberData.Parameters.Count-1// Calling MethodInfo.GetParameters() on a property setter includes the compiler generated "value" parameter at the end of the parameter list
0 commit comments