private string GetContentTypeHeader(ContentMicrotypeDescriptor contentDescriptor, IEnumerable <RuntimeMicrotypeDescriptor> runtimeDescriptors) { return(new IMicrotypeDescriptor[] { contentDescriptor } .Concat(runtimeDescriptors) .Aggregate( seed: new StringBuilder("application/vnd.microtypes-container+json"), func: (builder, descriptor) => builder .Append(';') .Append(descriptor.Category) .Append('=') .Append(descriptor.Identifier), resultSelector: builder => builder.ToString())); }
public bool AcceptsContentMicrotype(ContentMicrotypeDescriptor microtype) => true;
public MicrotypeRegistry RegisterContentMicrotype(ContentMicrotypeDescriptor descriptor) { _content.Add(descriptor); return(this); }
public bool AcceptsContentMicrotype(ContentMicrotypeDescriptor microtype) => microtype.Identifier == "json-home";