Beispiel #1
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}");
                }
            }
        }
Beispiel #2
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}");
                }
            }
        }
Beispiel #3
0
 public static V GetKey <T, V>(this System.Collections.Immutable.ImmutableDictionary <T, V> self, T key)
 {
     return(self[key]);
 }