/// <summary> /// Obtient le libellé d'un référentiel. /// </summary> /// <param name="id">L'identifiant du référentiel.</param> /// <returns>Le libellé.</returns> public static string GetLabelPlural(ProcessReferentialIdentifier id) { if (DesignMode.IsInDesignMode) { return(id.ToString() + " All"); } else { return(IoC.Resolve <IReferentialsUseService>().GetLabelPlural(id)); } }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { try { TrackableCollection <PublicationLocalization> localizations = ((TrackableCollection <PublishedAction>)value)?.FirstOrDefault()?.Publication?.Localizations; ProcessReferentialIdentifier refID = (ProcessReferentialIdentifier)parameter; string refName = refID.ToString(); var result = localizations?.SingleOrDefault(_ => _.ResourceKey == refName)?.Value; return(result); } catch { return(Binding.DoNothing); } }