Photon Fusion 2.1.1

SerializableType Struct Reference

A System.Type wrapper that can be serialized. More...

Public Member Functions

readonly SerializableType AsShort ()
 Converts AssemblyQualifiedName and returns a short form, without version, culture etc.
readonly override bool Equals (object obj)
 Returns true if obj is SerializableType and the AssemblyQualifiedName is the same.
readonly bool Equals (SerializableType other)
 Returns true if the AssemblyQualifiedName is the same.
readonly override int GetHashCode ()
 Returns the hash code of the AssemblyQualifiedName.
 SerializableType (string type)
 Create a new instance and stores type as AssemblyQualifiedName.
 SerializableType (Type type)
 Create a new instance and stores full Type.AssemblyQualifiedName. To use shorter form, use AsShort.

Static Public Member Functions

static string GetShortAssemblyQualifiedName (Type type)
 Converts the Type.AssemblyQualifiedName to a shorter form, without version, culture etc.
static implicit operator SerializableType (Type type)
 Implicitly convert a Type to a SerializableType.
static implicit operator Type (SerializableType serializableType)
 Implicitly convert a SerializableType to a Type.

Public Attributes

string AssemblyQualifiedName
 Type's assembly qualified name.

Properties

readonly bool IsValid [get]
 Is the type valid.
readonly Type Value [get]
 Retrieve the type. The value is obtained using Type.GetType(string) and cached in a static.

Detailed Description

A System.Type wrapper that can be serialized.

Constructor & Destructor Documentation

◆ SerializableType() [1/2]

SerializableType ( Type type)

Create a new instance and stores full Type.AssemblyQualifiedName. To use shorter form, use AsShort.

Parameters
typeType to store. Can be null.

◆ SerializableType() [2/2]

SerializableType ( string type)

Create a new instance and stores type as AssemblyQualifiedName.

Parameters
typeType name.