/// <inheritdoc/> public override BuildSpec CreateChildBuildSpec(BuildSpec parentBuildSpec, ExtendedQualifiedName childQualifiedName) { return(new BuildSpec(parentBuildSpec, childQualifiedName, new List <ExtendedQualifiedName>() { childQualifiedName })); }
private static async Task <DfirRoot> GenerateDfirAsync( ICompositionHost host, Envoy documentEnvoy, ProgressToken progressToken, CompileCancellationToken compileCancellationToken) { ExtendedQualifiedName topLevelDocumentName = documentEnvoy.CreateExtendedQualifiedName(); TargetCompiler targetCompiler = documentEnvoy.QueryInheritedService <ITargetCompilerServices>().First().Compiler; AnyMocCompiler compiler = host.GetSharedExportedValue <AnyMocCompiler>(); IReadOnlySymbolTable symbolTable = documentEnvoy.ComputeSymbolTable(); // A specAndQName is used by the compiler to identify the document for which we're asking for DFIR. var specAndQName = new SpecAndQName(targetCompiler.CreateDefaultBuildSpec(topLevelDocumentName, symbolTable), topLevelDocumentName); try { DfirRoot sourceDfirRoot = await compiler.GetTargetDfirAsync(specAndQName, compileCancellationToken, progressToken); if (sourceDfirRoot == null) { await ShowErrorMessageBoxAsync(host, WaitForCompileErrorMessageBoxText); } return(sourceDfirRoot); } catch { await ShowErrorMessageBoxAsync(host, DfirGenerationErrorMessageBoxText); return(null); } }
/// <inheritdoc/> public override BuildSpec CreateDefaultBuildSpec(ExtendedQualifiedName topLevelSourceModelName, IReadOnlySymbolTable symbolTable) { Log.Assert(0xC3B662C7U, topLevelSourceModelName.ComponentName != null, "Component name must be set in ExtendedQualifiedNames passed to compiler"); return(new BuildSpec(topLevelSourceModelName, ComponentTypeIdentifier.ObjFile, symbolTable, this, topLevelSourceModelName)); }
static HostExecutionServices() { _messageSource = ExtendedQualifiedName.CreateContentName(new QualifiedName("Rebar runtime"), string.Empty, ContentId.EmptyId).ToEncodedString(); }