public TargetCodeResult Compile(SourceCode aSourceCode, string aCurrentCodeLine, int aLinePosition)
        {
            TargetCodeResult result = new TargetCodeResult(aCurrentCodeLine);
            String usingNamespace = GetUsingNamespace(aSourceCode, aCurrentCodeLine);

            bool correctLine = IsUsingCorrect(usingNamespace);

            if (!correctLine && (IsSystemNamespace(usingNamespace) || IsProgramNamespace(aSourceCode, usingNamespace)))
                return new TargetCodeResult("");

            if (correctLine)
            {
                // TODO: For now we import all the Java classes in that package, we don't worry much about that since the Java compiler will take care of this for us
                // Suggest that we do change this in the future if required
                StringBuilder newLine = new StringBuilder();
                newLine.Append("import ").Append(usingNamespace).Append(".*;");
                result = new TargetCodeResult(newLine.ToString());
            }
            else
            {
                StringBuilder newLine = new StringBuilder();
                newLine.Append("//");
                newLine.Append(aCurrentCodeLine);
                newLine.Append("  // Not supported yet");
                result = new TargetCodeResult(newLine.ToString());
                result.LogError(aSourceCode.GetFileName() + ": Using directive not supported yet on line: " + aLinePosition);
            }
            return result;
        }
        public String DoValidation(SourceCode aSourceCode)
        {
            String result = null;

            int totalClasses = CountClassName(aSourceCode);
            int totalInterfaces = CountInterfaces(aSourceCode);

            if (totalClasses == 0 && totalInterfaces == 0)
                result = aSourceCode.GetFileName() + ": A C# file must at least contain a class or an interface. ";

            if (totalClasses == 1 && totalInterfaces != 0)
                result = aSourceCode.GetFileName() + ": A C# file can only have one class or interface just like Java. ";
            else if (totalInterfaces == 1 && totalClasses != 0)
                result = aSourceCode.GetFileName() + ": A C# file can only have one class or interface just like Java. ";

            return result;
        }
        public bool Identify(SourceCode aSourceCode, string aCurrentCodeLine, int aLinePosition)
        {
            // TODO: We need to also cater for C# properties later on

            bool result = false;
            if (aSourceCode.CountTokens(aCurrentCodeLine, '(') == 1 &&
                aSourceCode.CountTokens(aCurrentCodeLine, ')') == 1 &&
                aCurrentCodeLine.IndexOf(aSourceCode.GetFileName()) == -1 &&
                !aSourceCode.ContainKeyword(aCurrentCodeLine, "class") &&
                aCurrentCodeLine.Split(' ').Length > 2 &&
                !MainMethodComp.IdentifyMainMethod(aSourceCode, aCurrentCodeLine, aLinePosition) &&
                (aCurrentCodeLine.EndsWith("{") || aSourceCode.GetNextLine(aLinePosition).StartsWith("{")))
                result = true;

            return result;
        }
        public string DoValidation(SourceCode aSourceCode)
        {
            String result = null;

            bool foundIndexers = false;
            int pos = 1;
            foreach (String line in aSourceCode.GetLines())
            {
                if (line.IndexOf("this[") > -1 && (line.EndsWith("{") || aSourceCode.GetNextLine(pos).StartsWith("{")))
                    foundIndexers = true;
                pos++;
            }

            if (foundIndexers)
                result = aSourceCode.GetFileName() + ": Java unfortunatly doesn't support C# indexers. ";

            return result;
        }