protected virtual void WriteObjectContent(Object obj, Type type, IWriter writer) { ITypeBasedHandler extension = typeToElementHandlers.GetExtension(type); if (extension == null) { throw new Exception("No extension mapped to type '" + type.Name + "' found"); } extension.WriteObject(obj, type, writer); }
public void WriteObject(Object obj, IWriter writer) { Type type = ProxyHelper.GetRealType(obj.GetType()); ITypeBasedHandler extension = typeToElementHandlers.GetExtension(type); if (extension == null) { throw new ArgumentException("Could not write object: " + obj); } extension.WriteObject(obj, type, writer); }