Exemple #1
0
        private Matrix3x2Serializable(SerializationInfo info, StreamingContext context)
        {
            if (info is null)
            {
                throw new ArgumentNullException(nameof(info));
            }

            info.CheckForType(TYPE_NAME);
            Values = info.GetValue <float[]>(VALUES_FIELD);
        }
        private Vector2Serializable(SerializationInfo info, StreamingContext context)
        {
            if (info is null)
            {
                throw new ArgumentNullException(nameof(info));
            }

            info.CheckForType(TYPE_NAME);
            X = info.GetSingle(nameof(X));
            Y = info.GetSingle(nameof(Y));
        }
Exemple #3
0
 private PoseSerializable(SerializationInfo info, StreamingContext context)
     : this(info?.GetVector3(nameof(Position)) ?? throw new ArgumentNullException(nameof(info)),
            info.GetQuaternion(nameof(Orientation)))
 {
     info.CheckForType(TYPE_NAME);
 }