public HateoasMediaTypeFormatter(IHateoasContext hateoasContext, IResourceFactory resourceFactory, IHateoasSerializer hateoasSerializer) { _hateoasContext = hateoasContext; _resourceFactory = resourceFactory; _hateoasSerializer = hateoasSerializer; SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/json+hateoas")); SupportedEncodings.Add(new UTF8Encoding(false)); SupportedEncodings.Add(Encoding.GetEncoding("iso-8859-1")); }
/// <summary> /// Constructor with dependencies injected for testing purposes. /// </summary> public HateoasFormatter(IResourceFactory resourceFactory, IHateoasSerializer hateoasSerializer) : this() { _resourceFactory = resourceFactory; _hateoasSerializer = hateoasSerializer; }