mirror of
https://github.com/ppy/osu
synced 2025-01-11 08:39:31 +00:00
Remove unused binary serialization related code.
This commit is contained in:
parent
bf677ad0ac
commit
80e312dbbc
@ -4,7 +4,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace osu.Game.IO.Legacy
|
||||
@ -23,15 +22,6 @@ namespace osu.Game.IO.Legacy
|
||||
|
||||
public int RemainingBytes => (int)(stream.Length - stream.Position);
|
||||
|
||||
/// <summary> Static method to take a SerializationInfo object (an input to an ISerializable constructor)
|
||||
/// and produce a SerializationReader from which serialized objects can be read </summary>.
|
||||
public static SerializationReader GetReader(SerializationInfo info)
|
||||
{
|
||||
byte[] byteArray = (byte[])info.GetValue("X", typeof(byte[]));
|
||||
MemoryStream ms = new MemoryStream(byteArray);
|
||||
return new SerializationReader(ms);
|
||||
}
|
||||
|
||||
/// <summary> Reads a string from the buffer. Overrides the base implementation so it can cope with nulls. </summary>
|
||||
public override string ReadString()
|
||||
{
|
||||
|
@ -4,7 +4,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalse (we're allowing nulls to be passed to the writer where the underlying class doesn't).
|
||||
@ -221,13 +220,6 @@ namespace osu.Game.IO.Legacy
|
||||
} // if obj==null
|
||||
} // WriteObject
|
||||
|
||||
/// <summary> Adds the SerializationWriter buffer to the SerializationInfo at the end of GetObjectData(). </summary>
|
||||
public void AddToInfo(SerializationInfo info)
|
||||
{
|
||||
byte[] b = ((MemoryStream)BaseStream).ToArray();
|
||||
info.AddValue("X", b, typeof(byte[]));
|
||||
}
|
||||
|
||||
public void WriteRawBytes(byte[] b)
|
||||
{
|
||||
base.Write(b);
|
||||
|
Loading…
Reference in New Issue
Block a user