public static ICommand CreateCommand(Arguments arguments) { string c = arguments.GetArgumentValueWithoutAssertion(Arguments.REQUEST_ARG); if (!string.IsNullOrEmpty(c)) return new RestCommand(arguments); c = arguments.GetArgumentValueWithoutAssertion(Arguments.INSTALL); if (!string.IsNullOrEmpty(c)) return new InstallCommand(arguments); throw new UnKnownCommandException(); }