public virtual void writeSerializable(object o) { #if !COMPACT if(o == null) { writeSize(0); return; } try { StreamWrapper w = new StreamWrapper(this); IFormatter f = new BinaryFormatter(); f.Serialize(w, o); w.Close(); } catch(System.Exception ex) { throw new Ice.MarshalException("cannot serialize object:", ex); } #else throw new Ice.MarshalException("serialization not supported"); #endif }