@Imports System.Net.Http.Headers @ModelType Dictionary(Of MediaTypeHeaderValue, Object) @Code 'Group the samples into a single tab if they are the same. Dim samples As Dictionary(Of String, Object) = Model.GroupBy(Function(pair) pair.Value).ToDictionary( Function(pair) String.Join(", ", pair.Select(Function(m) m.Key.ToString()).ToArray()), Function(pair) pair.Key) Dim mediaTypes As Dictionary(Of String, Object).KeyCollection = samples.Keys End Code
@For Each mediaType As String In mediaTypes @

@mediaType

@
Sample: @Code Dim sample As Object = samples(mediaType) If sample Is Nothing Then @

Sample not available.

Else @Html.DisplayFor(Function(s) sample) End If End code
Next