Boo.BooLangStudioSpecs.Intellisense.FixtureCompiler.CompileForCurrentMethod C# (CSharp) Method

CompileForCurrentMethod() public method

public CompileForCurrentMethod ( ) : Boo.BooLangStudioSpecs.Intellisense.CompilationOutput
return Boo.BooLangStudioSpecs.Intellisense.CompilationOutput
        public CompilationOutput CompileForCurrentMethod()
        {
            var fixturesPath = GetFixturesDirectory();
            var compiler = GetCompiler();

            int? caretColumn = null;
            int? caretLine = null;
            string caretLineSource = null;
            string caretFileName = null;

            if (File.Exists(fixturesPath + ".boo"))
            {
                string source = GetSource(fixturesPath + ".boo", ref caretColumn, ref caretLine, ref caretLineSource, ref caretFileName);

                compiler.AddSource(fixturesPath + ".boo", source);
            }
            else
            {
                foreach (var file in Directory.GetFiles(fixturesPath))
                {
                    string source = GetSource(file, ref caretColumn, ref caretLine, ref caretLineSource, ref caretFileName);

                    compiler.AddSource(file, source);
                }
            }

            var project = compiler.Compile();

            return new CompilationOutput(project, new CaretLocation(caretColumn, caretLine, caretFileName, caretLineSource));
        }