public virtual void Write(char value)
{
}
TextWriter::Write ( bool value ) : void | |
TextWriter::Write ( char buffer, int index, int count ) : void | |
TextWriter::Write ( decimal value ) : void | |
TextWriter::Write ( double value ) : void | |
TextWriter::Write ( float value ) : void | |
TextWriter::Write ( int value ) : void | |
TextWriter::Write ( long value ) : void | |
TextWriter::Write ( object value ) : void | |
TextWriter::Write ( string value ) : void | |
TextWriter::Write ( string format, object arg0 ) : void | |
TextWriter::Write ( string format, object arg0, object arg1 ) : void | |
TextWriter::Write ( string format, object arg0, object arg1, object arg2 ) : void | |
TextWriter::Write ( uint value ) : void | |
TextWriter::Write ( ulong value ) : void |
/** * Prettyprint the object to the outputstream. */ public static void print(object o, TextWriter w, bool typeheader) { if (o == null) { if(typeheader) w.WriteLine("null object"); w.WriteLine("null"); w.Flush(); return; } if (o is IDictionary) { if(typeheader) w.WriteLine("hashtable"); IDictionary map=(IDictionary)o; w.Write("{"); foreach(object key in map.Keys) { w.Write(key.ToString()+"="+map[key].ToString()+", "); } w.WriteLine("}"); } else if (o is string) { if(typeheader) w.WriteLine("String"); w.WriteLine(o.ToString()); } else if (o is DateTime) { if(typeheader) w.WriteLine("DateTime"); w.WriteLine((DateTime)o); } else if (o is IEnumerable) { if(typeheader) w.WriteLine(o.GetType().Name); writeEnumerable(o, w); w.WriteLine(""); } else { if(typeheader) w.WriteLine(o.GetType().Name); w.WriteLine(o.ToString()); } w.Flush(); }