mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 19:10:23 -10:00
* LosFormatter.cs: Use ObjectStateFormatter. Pretty big size reduction. * ObjectStateFormatter.cs: Comment out tracing. svn path=/trunk/mcs/; revision=20647
49 lines
897 B
C#
49 lines
897 B
C#
//
|
|
// System.Web.UI.LosFormatter
|
|
//
|
|
// Authors:
|
|
// Ben Maurer ([email protected])
|
|
//
|
|
// (C) 2003 Ben Maurer
|
|
//
|
|
|
|
using System.IO;
|
|
|
|
|
|
namespace System.Web.UI {
|
|
public sealed class LosFormatter {
|
|
|
|
ObjectStateFormatter osf = new ObjectStateFormatter ();
|
|
|
|
public object Deserialize (Stream stream)
|
|
{
|
|
return osf.Deserialize (stream);
|
|
}
|
|
|
|
public object Deserialize (TextReader input)
|
|
{
|
|
if (input == null)
|
|
throw new ArgumentNullException ("input");
|
|
|
|
return Deserialize (input.ReadToEnd ());
|
|
}
|
|
|
|
public object Deserialize (string input)
|
|
{
|
|
return osf.Deserialize (input);
|
|
}
|
|
|
|
public void Serialize (Stream stream, object value)
|
|
{
|
|
osf.Serialize (stream, value);
|
|
}
|
|
|
|
public void Serialize (TextWriter output, object value)
|
|
{
|
|
if (output == null)
|
|
throw new ArgumentNullException ("output");
|
|
|
|
output.Write (osf.Serialize (value));
|
|
}
|
|
}
|
|
} |