C# Class Unity.Serialization.PropertyChecks

Helper class to validate properties during serialization and deserialization.
Afficher le fichier Open project: Unity-Technologies/com.unity.reflect.viewer

Méthodes publiques

Méthode Description
CheckReadOnlyPropertyForDeserialization ( Property property, &container, &value, string &error ) : bool

Validates a readonly property was correctly deserialized. This can be used this to catch any errors which could fail silently.

Private Methods

Méthode Description
GetReadOnlyReferenceTypeErrorMessage ( Type type, string propertyName ) : string
GetReadOnlyReferenceTypeWithInvalidTypeErrorMessage ( Type type, string propertyName ) : string
GetReadOnlyValueTypeErrorMessage ( Type type, string propertyName ) : string
IsPropertyExcludedFromSerialization ( IProperty property ) : bool

Returns if the property should be skipped during serialization and deserialization.

Method Details

CheckReadOnlyPropertyForDeserialization() public static méthode

Validates a readonly property was correctly deserialized. This can be used this to catch any errors which could fail silently.
public static CheckReadOnlyPropertyForDeserialization ( Property property, &container, &value, string &error ) : bool
property Property The property being deserialized.
container The container being deserialized.
value The deserialized value from the stream.
error string When this method returns, contains the error message. If any.
Résultat bool