DynamicDataSourceResolver.RegisterDisplayNameProvider Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Infrastructure. Registers a compile-time accessor for the custom display-name method named
methodName on declaringType (see
DynamicDataDisplayName).
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static void RegisterDisplayNameProvider(Type declaringType, string methodName, Func<System.Reflection.MethodInfo,object?[]?,string?> displayNameProvider);
[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]
static member RegisterDisplayNameProvider : Type * string * Func<System.Reflection.MethodInfo, obj[], string> -> unit
Public Shared Sub RegisterDisplayNameProvider (declaringType As Type, methodName As String, displayNameProvider As Func(Of MethodInfo, Object(), String))
Parameters
- declaringType
- Type
The type declaring the display-name method.
- methodName
- String
The display-name method name.
- displayNameProvider
- Func<MethodInfo,Object[],String>
A delegate that invokes the display-name method with the test MethodInfo and the row
data, returning the computed display name. The last registration for a given
(declaringType, methodName) pair wins.
- Attributes
Remarks
Do not call from hand-written code; invoked only from the generator's module initializer.