public void AddChildMediaTypes(IEnumerable <MediaType> items) { MediaTypes.Clear(); foreach (MediaType item in items.Where(item => MediaTypes.Where(i => i.ID == item.ID).Count() == 0)) { MediaTypes.Add(BaseMapper.GetObjectFromContext(item)); } }
public CsvContentNegotiation() { MediaTypes.Add("text/csv"); Extension = "csv"; }
public XmlContentNegotiation() { MediaTypes.Add("text/xml"); Extension = "xml"; }
public JsonContentNegotiation() { MediaTypes.Add("application/json"); Extension = "json"; }
public AtomContentNegotiation() { MediaTypes.Add("application/atom+xml"); Extension = "atom"; }
public PartialViewNegotiation() { MediaTypes.Add("text/html"); Extension = "phtml"; AlwaysReturnPartial = true; }