using Apewer.Web; using System; using System.Collections.Generic; using System.Text; namespace Apewer.AspNetBridge { /// public interface IHttpActionResult { } /// public class HttpActionResult : IHttpActionResult { /// public int Status { get; set; } /// public string ContentType { get; set; } /// public string Attachment { get; set; } /// public byte[] Bytes { get; set; } /// public StringPairs Cookies { get; set; } /// public HttpActionResult() { Cookies = new StringPairs(); } internal ApiModel ToModel() { var har = this; if (har == null) return new ApiStatusModel(204); var model = new ApiBytesModel(); model.Status = har.Status; model.Bytes = har.Bytes; model.ContentType = har.ContentType; model.Attachment = har.Attachment; return model; } } }