Пример #1
0
        public static void LogComputerInformation([NotNull] ILogger logger)
        {
            logger = logger.ArgumentNotNull();

            var computerInfo = new ComputerInfo();

            System.Collections.Immutable.ImmutableDictionary <string, string> values = TypeHelper.GetPropertyValues(computerInfo);

            if (values?.FastCount() > 0)
            {
                foreach (KeyValuePair <string, string> item in values.OrderBy(p => p.Key))
                {
                    EasyLogger.LogDebug(logger, $"{nameof(ComputerInfo)}:{item.Key} - {item.Value}");
                }
            }
        }
Пример #2
0
        public static void LogApplicationInformation([NotNull] ILogger logger)
        {
            logger = logger.ArgumentNotNull();

            AppInfo appInfo = App.AppInfo;

            System.Collections.Immutable.ImmutableDictionary <string, string> values = TypeHelper.GetPropertyValues(appInfo);

            if (values?.FastCount() > 0)
            {
                foreach (KeyValuePair <string, string> item in values.OrderBy(p => p.Key))
                {
                    EasyLogger.LogInformation(logger, $"{nameof(AppInfo)}:{item.Key} - {item.Value}");
                }
            }
        }