mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 07:12:27 +02:00
* Change serialization reading to only do type checks once per type * Optimize for sealed types in arrays * Oops the context * Fix ISelfSerialize node type and null values * Add int read test * Remove nullability from constructor and property of DeserializedValue * Add clearing readers to serialization shutdown * Fix struct populate default values Remove some notnull constraints * Replace robust gen with normal il generator
25 lines
715 B
C#
25 lines
715 B
C#
namespace Robust.Shared.Serialization.Manager.Result
|
|
{
|
|
public abstract class DeserializationResult
|
|
{
|
|
public abstract object? RawValue { get; }
|
|
|
|
public abstract DeserializationResult PushInheritanceFrom(DeserializationResult source);
|
|
|
|
public abstract DeserializationResult Copy();
|
|
|
|
public abstract void CallAfterDeserializationHook();
|
|
|
|
public T Cast<T>() where T : DeserializationResult
|
|
{
|
|
if (this is T value) return value;
|
|
throw new InvalidDeserializedResultTypeException<T>(GetType());
|
|
}
|
|
}
|
|
|
|
public abstract class DeserializationResult<T> : DeserializationResult
|
|
{
|
|
public abstract T? Value { get; }
|
|
}
|
|
}
|