Class TypeExtensions
- Namespace
- Stratara.Shared.Reflections
- Assembly
- Stratara.Shared.dll
Extension helpers that produce version-independent CLR type-name strings suitable for embedding in persisted events and the outbox. Assembly version / culture / public-key-token segments are trimmed so that an assembly rev-bump does not invalidate previously-stored type names.
public static class TypeExtensions
- Inheritance
-
TypeExtensions
- Inherited Members
Methods
GetQualifiedTypeName(Type)
Returns a cached, version-independent qualified type name for type.
Falls back to FullName or the unqualified Type.Name when
AssemblyQualifiedName is unavailable.
public static string GetQualifiedTypeName(this Type type)
Parameters
typeTypeThe type to name.
Returns
- string
A stable type-name string safe to persist.
GetVersionIndependentTypeName(string)
Strips assembly version / culture / public-key-token segments from a fully-qualified
assembly-qualified type name, retaining only TypeName, AssemblyName.
public static string GetVersionIndependentTypeName(this string assemblyQualifiedName)
Parameters
assemblyQualifiedNamestringA fully-qualified assembly-qualified type-name string.
Returns
- string
The version-independent equivalent suitable for GetType(string) lookups across assembly revisions.