/// <summary> /// The entry point for the Aegis application. /// </summary> public static void Main(string[] args) { try { if (args is null || args.Length == 0) { // No arguments -> signal to start REPL mode. args = new string[] { ReplHelpers.StartReplVerb }; } var ioStreams = new IOStreamSet( Console.Out, Console.Error, Console.In, Console.ReadKey); var aegis = new AegisInterface(ioStreams); aegis.Run(args); } catch (AegisUserErrorException e) { Console.Error.WriteLine($"[Error] {e.Message}"); } catch (Exception e) { Console.Error.WriteLine($"[INTERNAL ERROR] {Name} ran into internal issues.{Environment.NewLine}Error details: {e}"); } }
/// <summary> /// Initializes a new instance of the <see cref="AegisInterface"/> class. /// </summary> /// <param name="ioStreamSet">The IO streams.</param> public AegisInterface(IOStreamSet ioStreamSet) { ArgCheck.NotNull(ioStreamSet, nameof(ioStreamSet)); this.IO = ioStreamSet; this.ArchiveUnlocker = new ArchiveUnlocker( new SecretSelector(ioStreamSet), new PasswordEntryInterface(ioStreamSet)); }