private static void AddProfileToContentType(ResultExecutingContext context, SchemaAttribute schemaAttribute, bool keepUnquoted = false) { var profile = keepUnquoted ? schemaAttribute.SchemaFilePath : $"\"{schemaAttribute.SchemaFilePath?.Replace("\"", "\\\"")}\""; context.HttpContext.Response.ContentType += $"; profile={profile}"; }
public TypeSchemaPair(Type type, SchemaAttribute schemaAttribute) { Type = type; SchemaAttribute = schemaAttribute; }