Skip to main content
Table of Contents

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

type Type

The 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

assemblyQualifiedName string

A fully-qualified assembly-qualified type-name string.

Returns

string

The version-independent equivalent suitable for GetType(string) lookups across assembly revisions.