Example #1
0
        public static void WriteObject(BinaryWriter writer, object obj_)
        {
            Type type = obj_.GetType();

            writer.Write(type.FullName);
            TypeHandler handler = GetTypeHandler(type);

            handler.Write(writer, obj_);
        }
Example #2
0
        public static void WriteObject <T>(BinaryWriter writer, T obj_)
        {
            if (obj_ == null)
            {
                writer.Write("");
                return;
            }
            writer.Write(typeof(T).FullName);
            TypeHandler handler = GetTypeHandler(typeof(T));

            handler.Write(writer, obj_);
        }