using ChaosBot.Models; namespace ChaosBot.Services.ProgrammingLanguageInterpreter { public static class ProgrammingLanguageInterpreterFacade { public static bool TryInterpret(CustomCommand customCommand) { IProgrammingLanguageInterpreter interpreter = ProgrammingLanguageInterpreterFactory.GetInterpreter(customCommand.Type); if (interpreter == null) return false; interpreter.Interpret(customCommand.Content, customCommand.Command); return true; } } }