public StaffEdgeViewModel(StaffEdge model, StaffEdgeDetailType primaryStaffEdgeDetailType, StaffEdgeDetailType secondaryStaffEdgeDetailType) : base(model) { TitleText = $"{Model.Node?.Name?.Full ?? Model.Node?.Name?.FormattedName}"; DetailPrimaryText = GetDetail(primaryStaffEdgeDetailType); DetailSecondaryText = GetDetail(secondaryStaffEdgeDetailType); ImageUri = Model.Node?.Image?.Large ?? Model?.Node?.Image?.Medium; }
private string GetDetail(StaffEdgeDetailType detailType) { string retString = null; if (detailType == StaffEdgeDetailType.NativeName) { retString = $"{Model.Node?.Name?.Native}"; } else if (detailType == StaffEdgeDetailType.Role) { retString = $"{Model?.Role}"; } return(retString); }