Пример #1
0
        private void Detect()
        {
            Info("Invoked the Profile.Detect command.");

            try
            {
                var result = LastprofFactory.Get(LastprofFactory.Type.Detect, Output);
                Console.WriteLine(result.Parse());
            }
            catch (FileNotFoundException e)
            {
                Fail(e.Message, ExitType.Exception);
            }
            catch (ProfileException e)
            {
                Fail(e.Message, ExitType.Exception);
            }
        }
Пример #2
0
 /// <summary>
 ///     Attempts to detect the currently used HCE profile on the filesystem.
 /// </summary>
 /// <returns>
 ///     Currently used HCE profile, assuming the environment is valid.
 /// </returns>
 public static string Detect()
 {
     return(LastprofFactory.Get(LastprofFactory.Type.Detect).Parse());
 }