TypeExtensionsGetName(Type, TypeNameKind, FuncType, AssemblyName, FuncType, String) Method
Gets the name of the
type by the specified
kind using custom callbacks
for resolving the assembly and type names.
See the
Remarks section of the
GetName(Type, TypeNameKind) overload for details.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
public static string GetName(
this Type type,
TypeNameKind kind,
Func<Type, AssemblyName?>? assemblyNameResolver,
Func<Type, string?>? typeNameResolver
)
<ExtensionAttribute>
Public Shared Function GetName (
type As Type,
kind As TypeNameKind,
assemblyNameResolver As Func(Of Type, AssemblyName),
typeNameResolver As Func(Of Type, String)
) As String
public:
[ExtensionAttribute]
static String^ GetName(
Type^ type,
TypeNameKind kind,
Func<Type^, AssemblyName^>^ assemblyNameResolver,
Func<Type^, String^>^ typeNameResolver
)
[<ExtensionAttribute>]
static member GetName :
type : Type *
kind : TypeNameKind *
assemblyNameResolver : Func<Type, AssemblyName> *
typeNameResolver : Func<Type, string> -> string
- type Type
- The type whose name is to be obtained.
- kind TypeNameKind
- The formatting kind for the name to be retrieved. Determines the fallback names if the callbacks return ,
and whether the assemblyNameResolver will be called.
- assemblyNameResolver FuncType, AssemblyName
- If not , then will be called when the assembly identity of a type is requested.
- typeNameResolver FuncType, String
- If not , then will be called for each ultimate element type and generic type definitions from
which type consists of.
StringThe name of the
type by the specified
kind using the specified custom callbacks.In Visual Basic and C#, you can call this method as an instance method on any object of type
Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).