Files
Javier Guardia FernándezandGitHub 0cbff8dee1 Change serialization reading to only do type checks once per type (#2018)
* 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
2021-09-13 18:14:52 +02:00

41 lines
1.4 KiB
C#

using Robust.Shared.Serialization.Manager.Result;
using Robust.Shared.Serialization.Markdown.Mapping;
namespace Robust.Shared.Serialization.Manager.Definition
{
public partial class DataDefinition
{
private delegate DeserializedFieldEntry[] DeserializeDelegate(
MappingDataNode mappingDataNode,
ISerializationManager serializationManager,
ISerializationContext? context,
bool skipHook);
private delegate DeserializationResult PopulateDelegateSignature(
object target,
DeserializedFieldEntry[] deserializationResults,
object?[] defaultValues);
private delegate MappingDataNode SerializeDelegateSignature(
object obj,
ISerializationManager serializationManager,
ISerializationContext? context,
bool alwaysWrite,
object?[] defaultValues);
private delegate object CopyDelegateSignature(
object source,
object target,
ISerializationManager serializationManager,
ISerializationContext? context);
private delegate DeserializationResult CreateDefinitionDelegate(
object value,
DeserializedFieldEntry[] mappings);
private delegate TValue AccessField<TTarget, TValue>(ref TTarget target);
private delegate void AssignField<TTarget, TValue>(ref TTarget target, TValue? value);
}
}