public static void AddWithTryCatch(this IThirdPartyNoticesService thirdPartyNoticesService,
                                           Func <ThirdPartyNotice> func)
        {
            Argument.IsNotNull(() => thirdPartyNoticesService);
            Argument.IsNotNull(() => func);

            try
            {
                var thirdPartyNotice = func();
                thirdPartyNoticesService.Add(thirdPartyNotice);
            }
            catch (Exception ex)
            {
                Log.Error(ex, "Failed to add third party notice");
            }
        }
Ejemplo n.º 2
0
        public ThirdPartyNoticesViewModel(IAboutInfoService aboutInfoService,
                                          IThirdPartyNoticesService thirdPartyNoticesService)
        {
            Argument.IsNotNull(() => aboutInfoService);
            Argument.IsNotNull(() => thirdPartyNoticesService);

            _thirdPartyNoticesService = thirdPartyNoticesService;

            var aboutInfo = aboutInfoService.GetAboutInfo();

            Title = LanguageHelper.GetString("Orchestra_ThirdPartyNotices_Title");

            var explanation = LanguageHelper.GetString("Orchestra_ThirdPartyNotices_Explanation");

            Explanation = string.Format(explanation, aboutInfo.Company, aboutInfo.ProductName);
        }