Example #1
0
        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;
            }
        }
Example #2
0
 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()
     };
 }