public static NetworkText Deserialize(BinaryReader reader) { NetworkText.Mode mode = (NetworkText.Mode)reader.ReadByte(); NetworkText networkText = new NetworkText(reader.ReadString(), mode); networkText.DeserializeSubstitutionList(reader); return(networkText); }
public static NetworkText DeserializeLiteral(BinaryReader reader) { NetworkText.Mode mode = (NetworkText.Mode)reader.ReadByte(); NetworkText networkText = new NetworkText(reader.ReadString(), mode); networkText.DeserializeSubstitutionList(reader); if (mode != NetworkText.Mode.Literal) { networkText.SetToEmptyLiteral(); } return(networkText); }