ScalarOrObjectSerializer Class
Namespace: Stride.Core.Assets.Serializers
Assembly: Stride.Core.Assets.dll
Serializer that works with scalar, but could still read older ObjectSerializer format.
System.Object →
ScalarOrObjectSerializer
public abstract class ScalarOrObjectSerializer : IYamlSerializableFactory, IYamlSerializable, IDataCustomVisitor
|
Improve this Doc
View Source
Constructors
ScalarOrObjectSerializer()
protected ScalarOrObjectSerializer()
|
Improve this Doc
View Source
Methods
CanVisit(Type)
public abstract bool CanVisit(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
Type |
Description |
System.Boolean |
|
ConvertFrom(ref ObjectContext, Scalar)
public abstract object ConvertFrom(ref ObjectContext context, Scalar fromScalar)
Parameters
Type |
Name |
Description |
Stride.Core.Yaml.Serialization.ObjectContext |
context |
|
Stride.Core.Yaml.Events.Scalar |
fromScalar |
|
Returns
Type |
Description |
System.Object |
|
ConvertTo(ref ObjectContext)
public abstract string ConvertTo(ref ObjectContext objectContext)
Parameters
Type |
Name |
Description |
Stride.Core.Yaml.Serialization.ObjectContext |
objectContext |
|
Returns
Type |
Description |
System.String |
|
ReadYaml(ref ObjectContext)
public object ReadYaml(ref ObjectContext objectContext)
Parameters
Type |
Name |
Description |
Stride.Core.Yaml.Serialization.ObjectContext |
objectContext |
|
Returns
Type |
Description |
System.Object |
|
ShouldSerializeAsScalar(ref ObjectContext)
protected virtual bool ShouldSerializeAsScalar(ref ObjectContext objectContext)
Parameters
Type |
Name |
Description |
Stride.Core.Yaml.Serialization.ObjectContext |
objectContext |
|
Returns
Type |
Description |
System.Boolean |
|
TryCreate(SerializerContext, ITypeDescriptor)
public IYamlSerializable TryCreate(SerializerContext context, ITypeDescriptor typeDescriptor)
Parameters
Type |
Name |
Description |
Stride.Core.Yaml.Serialization.SerializerContext |
context |
|
Stride.Core.Reflection.ITypeDescriptor |
typeDescriptor |
|
Returns
Type |
Description |
Stride.Core.Yaml.Serialization.IYamlSerializable |
|
Visit(ref VisitorContext)
public void Visit(ref VisitorContext context)
Parameters
Type |
Name |
Description |
Stride.Core.Reflection.VisitorContext |
context |
|
WriteScalar(ref ObjectContext, ScalarEventInfo)
protected virtual void WriteScalar(ref ObjectContext objectContext, ScalarEventInfo scalar)
Parameters
Type |
Name |
Description |
Stride.Core.Yaml.Serialization.ObjectContext |
objectContext |
|
Stride.Core.Yaml.Serialization.ScalarEventInfo |
scalar |
|
WriteYaml(ref ObjectContext)
public void WriteYaml(ref ObjectContext objectContext)
Parameters
Type |
Name |
Description |
Stride.Core.Yaml.Serialization.ObjectContext |
objectContext |
|
Extension Methods