@model System.Collections.Generic.KeyValuePair @using Disco.Models.Services.Users.Contact @{ UserContactEmail email; if (UserContactEmail.TryParse(null, null, Model.Value, out email)) { @(string.IsNullOrWhiteSpace(email.Name) ? email.EmailAddress : email.Name) } else { UserContactAustralianPhone phone; if (UserContactAustralianPhone.TryParse(null, null, Model.Value, out phone)) { @(string.IsNullOrWhiteSpace(phone.Name) ? phone.PhoneNumber : phone.Name) } else { UserContactAustralianPhone mobile; if (UserContactAustralianPhone.TryParse(null, null, Model.Value, out mobile)) { @(string.IsNullOrWhiteSpace(mobile.Name) ? mobile.PhoneNumber : mobile.Name) } else { @Model.Value } } } }