Exemple #1
0
        public string GetBestSummary([NotNull] CultureInfo language, [CanBeNull] string command = null)
        {
            #region Sanity checks
            if (language == null)
            {
                throw new ArgumentNullException("language");
            }
            #endregion

            if (command == null)
            {
                command = Command.NameRun;
            }

            var entryPoint = GetEntryPoint(command);
            if (entryPoint != null)
            {
                string summary = entryPoint.Summaries.GetBestLanguage(language);
                if (!string.IsNullOrEmpty(summary))
                {
                    return(summary);
                }
            }

            return(Summaries.GetBestLanguage(language));
        }