/// <summary> /// Выполнение цели /// </summary> /// <param name="context"></param> public override void Execute(IBSharpContext context) { var compiler = new BSharpCompiler(); foreach (var e in Project.CompilerExtensions ) { compiler.Extensions.Add(e); } var cfg = GetConfig(); compiler.Initialize(cfg); compiler.Compile(Project.Sources, context); HandleErrorStream(context); }
/// <summary> /// Парсит текущий JSON контекст /// </summary> public void CompileContext() { BSharpConfig config = GetBSharpConfig(); var list = new List <XElement>(); foreach (string json in _jsonContext) { list.AddRange( RebuildJsonToBSharpStyle(json) ); } _bSharpCompiler.Initialize(config); IBSharpContext compiled = _bSharpCompiler.Compile(list, (IBSharpContext)null); _bSharpContext.Merge(compiled); }
/// <summary> /// Выполнение цели /// </summary> /// <param name="context"></param> public override void Execute(IBSharpContext context) { var compiler = new BSharpCompiler(); compiler.Log = Project.Log; Project.Compiler = compiler; foreach (var e in Project.CompilerExtensions) { compiler.Extensions.Add(e); } var cfg = GetConfig(); compiler.Initialize(cfg); compiler.Compile(Project.Sources, context); HandleErrorStream(context); }