Changeset 143 for binary-improvements/7dtd-server-fixes/src/PersistentData
- Timestamp:
- Aug 30, 2014, 3:47:59 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes/src/PersistentData
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PersistentData/KnownPlayers.cs
r142 r143 4 4 namespace AllocsFixes.PersistentData 5 5 { 6 [Serializable ()]7 public class KnownPlayers : ISerializable6 [Serializable] 7 public class KnownPlayers 8 8 { 9 9 private int entityId; … … 16 16 public KnownPlayers (SerializationInfo info, StreamingContext ctxt) 17 17 { 18 this.entityId = info.GetInt32 ("entityId");19 this.name = info.GetString ("name");18 this.entityId = info.GetInt32 ("entityId"); 19 this.name = info.GetString ("name"); 20 20 } 21 22 public void GetObjectData (SerializationInfo info, StreamingContext context) 23 { 24 info.AddValue("name", this.name); 25 } 26 } 21 } 27 22 } 28 23 -
binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs
r142 r143 7 7 namespace AllocsFixes.PersistentData 8 8 { 9 [Serializable ()]10 public class PersistentContainer : ISerializable9 [Serializable] 10 public class PersistentContainer 11 11 { 12 12 public Dictionary<string, KnownPlayers> players = new Dictionary<string, KnownPlayers> (); … … 49 49 } 50 50 51 public PersistentContainer (SerializationInfo info, StreamingContext ctxt)52 {53 this.players = (Dictionary<string, KnownPlayers>)info.GetValue ("players", typeof(Dictionary<string, KnownPlayers>));54 }55 56 public void GetObjectData (SerializationInfo info, StreamingContext context)57 {58 info.AddValue ("players", this.players);59 }60 61 51 } 62 52 }
Note:
See TracChangeset
for help on using the changeset viewer.