namespace MycroForge.CLI.Commands; public class OptionsContainer { private readonly Dictionary _args = new(); public void Set(T? args) { if (args is null) throw new ArgumentNullException(); _args[args.GetType()] = args; } public T Get() { if (!_args.ContainsKey(typeof(T))) throw new KeyNotFoundException(); if (_args[typeof(T)] is not T args) throw new InvalidCastException(); return args; } }