示例#1
0
 public static void Serialize <T>(SerializeContext context, BinaryWriter bw, TagLookup <T> value)
 {
     for (var i = 0; i < value.Count; i++)
     {
         Field.Serialize(context, bw, ref value.values[i]);
     }
 }
示例#2
0
 public Enumerator(TagLookup <T> owner)
 {
     i          = 0;
     current    = default(T);
     this.owner = owner;
 }
示例#3
0
 public ValueCollection(TagLookup <T> owner)
 {
     this.owner = owner;
 }
示例#4
0
 public Enumerator(TagLookup <T> owner)
 {
     i          = 0;
     current    = default(KeyValuePair <TagSet, T>);
     this.owner = owner;
 }
示例#5
0
 public Enumerator(TagLookup <T> owner)
 {
     i          = 0;
     current    = null;
     this.owner = owner;
 }
示例#6
0
 public static void Deserialize <T>(DeserializeContext context, BinaryReader br, ref TagLookup <T> value)
 {
     throw new InvalidOperationException();
 }
示例#7
0
        // NOTE: Pass-through the animation serializer to a simple binary serializer (the format of `TagLookup` is *really* stable, and some folks need to directly serialize us)

        public static void SerializeTagLookup <T>(this TagLookup <T> tagLookup, AnimationSerializeContext context,
                                                  Action <T> serializeValue)
        {
            tagLookup.Serialize(context.bw, serializeValue);
        }
示例#8
0
 public static void Serialize <T>(SerializeContext context, BinaryWriter bw, TagLookup <T> value)
 {
     value.NetworkSerializeHelper(context, bw); // <- so we can access private `count` field directly
 }