예제 #1
0
        public override T ReadFromUndoSnapshot(UndoSnapshotReader reader)
        {
            var obj = reader.ReadManagedReference() as T;

            builder.ReadUndo(obj, reader);
            return(obj);
        }
예제 #2
0
            public override void ReadUndo(object target, UndoSnapshotReader reader)
            {
                var t = target as T;

                for (var i = firstWritableProperty; i < properties.Length; i++)
                {
                    properties[i].DeserializeFromUndoBuilder(t, reader);
                }
            }
예제 #3
0
        public override void DeserializeFromUndoBuilder(TOwner owner, UndoSnapshotReader reader)
        {
            var list = getter(owner);

            list.Clear();
            var count = reader.reader.ReadInt32();

            for (var i = 0; i < count; i++)
            {
                list.Add(new KeyValuePair <TKey, TValue>(KeySerializer.ReadFromUndoSnapshot(reader), ValueSerializer.ReadFromUndoSnapshot(reader)));
            }
        }
예제 #4
0
        public override void DeserializeFromUndoBuilder(TOwner owner, UndoSnapshotReader reader)
        {
            var list = getter(owner);

            list.Clear();
            var count = reader.reader.ReadInt32();

            for (var i = 0; i < count; i++)
            {
                list.Add(reader.ReadOwnedReference <TElement>(owner));
            }
        }
예제 #5
0
            public override void ReadUndo(object target, UndoSnapshotReader reader)
            {
                var t = target as T;

                foreach (var property in properties)
                {
                    if (property.type == PropertyType.Normal)
                    {
                        property.DeserializeFromUndoBuilder(t, reader);
                    }
                }
            }
예제 #6
0
 public abstract void ReadUndo(object target, UndoSnapshotReader reader);
예제 #7
0
 public override float ReadFromUndoSnapshot(UndoSnapshotReader reader) => reader.reader.ReadSingle();
예제 #8
0
 public override int ReadFromUndoSnapshot(UndoSnapshotReader reader) => reader.reader.ReadInt32();
예제 #9
0
        public override T ReadFromUndoSnapshot(UndoSnapshotReader reader)
        {
            var val = reader.reader.ReadInt32();

            return(Unsafe.As <int, T>(ref val));
        }
예제 #10
0
 public override T ReadFromUndoSnapshot(UndoSnapshotReader reader) => reader.ReadManagedReference() as T;
예제 #11
0
 public override ulong ReadFromUndoSnapshot(UndoSnapshotReader reader) => reader.reader.ReadUInt64();
예제 #12
0
 public override bool ReadFromUndoSnapshot(UndoSnapshotReader reader) => reader.reader.ReadBoolean();
예제 #13
0
 public override void DeserializeFromUndoBuilder(TOwner owner, UndoSnapshotReader reader) => setter(owner, ValueSerializer.ReadFromUndoSnapshot(reader));
예제 #14
0
 public abstract void DeserializeFromUndoBuilder(TOwner owner, UndoSnapshotReader reader);
예제 #15
0
 public override void DeserializeFromUndoBuilder(TOwner owner, UndoSnapshotReader reader)
 {
     setter(owner, reader.ReadOwnedReference <TPropertyType>(owner));
 }
예제 #16
0
 public override void DeserializeFromUndoBuilder(TOwner owner, UndoSnapshotReader reader)
 {
 }