Boo.BooLangService.Document.BooDocumentCompiler.AddSource C# (CSharp) Method

AddSource() public method

public AddSource ( string fileName, string source ) : void
fileName string
source string
return void
        public void AddSource(string fileName, string source)
        {
            compiler.Parameters.Input.Add(new StringInput(fileName, source));
        }

Usage Example

        /// <summary>
        /// Iterates the files and compiles them en-masse.
        /// </summary>
        private void Compile()
        {
            var compiler = new BooDocumentCompiler();

            files.ForEach(f => compiler.AddSource(f.Path, f.Source));
            references.ForEach(r => compiler.AddReference(r));

            compiledProject = compiler.Compile();

            files.ForEach(f => f.IsDirty = false);
        }