public ProblemDetails(Problem problem, User author, ICodeGolfLanguage language, bool authenticated, string identity) : base(authenticated, identity) { _problem = problem; Author = author.Identity; AuthorId = author.UserId.ToString(); Language = language; IsAuthor = Author == identity; //TODO: Let's make this a bit more elegant... if (language.Name == "csharp") { SolutionHelp = Resource.CSharpHelp; } }
public LanguageFactory() { Languages = new ICodeGolfLanguage[] { new BatCodeGolfLanguage(), new CoffeeCodeGolfLanguage(), new CSharpCodeGolfLanguage(), new CppCodeGolfLanguage(), new FSharpCodeGolfLanguage(), new GoCodeGolfLanguage(), new JadeCodeGolfLanguage(), new JavaCodeGolfLanguage(), new JavaScriptCodeGolfLanguage(), new ObjectiveCCodeGolfLanguage(), new OtherCodeGolfLanguage("Other"), new PowerShellCodeGolfLanguage(), new PythonCodeGolfLanguage(), new RCodeGolfLanguage(), new RubyCoffeeCodeGolfLanguage(), new SqlCodeGolfLanguage(), new SwiftCodeGolfLanguage(), new VbCodeGolfLanguage() }; }