public SourcingFrom(ISingleNodeSnapshot from, ISubTreeSnapshot subject, int batchindex, string stageName, string pluginId, object pluginMetadata, IDictionary <string, string> tags) : base(batchindex, stageName, pluginId, pluginMetadata, tags) { this.Scopes.Add(from); this.Scopes.Add(subject); this.From = from; this.Subject = subject; }
public SyntaxEditor(ISubTreeSnapshot snapshot, CodeFileCSharp input, CodeFileCSharp output, Parameters inputParameters, Settings settings) { this.snapshot = snapshot; this.input = input; this.output = output; this.inputParameters = inputParameters; this.settings = settings; }
public Generated(ISubTreeSnapshot subject, int batchindex, string stageName, string pluginId, object pluginMetadata, IDictionary <string, string> tags, ISingleNodeSnapshot from = null) : base(batchindex, stageName, pluginId, pluginMetadata, tags) { this.Scopes.Add(subject); if (from != null) { this.Scopes.Add(from); } this.Subject = subject; this.From = from; }
protected void Refine(Node source, NodePathLevel[] sourceRootLevels, NodePathLevel[] subjectRootLevels, ISubTreeSnapshot subjectSnapshot, List <NodeRelation> result) { if (source.Records.Count > 0) { var sourceLevels = source.GetPathLevelsFromRoot().ToArray(); NodePath path = new NodePath(source.Language, subjectRootLevels.Concat(NodePath.RelativeTo(sourceLevels, sourceRootLevels))); if (subjectSnapshot.ContainsNode(path)) { result.Add(new NodeRelation(RelationKind.SourcingFrom, this.metadataIndexed.AllocateNode(path), source)); } else { return; } } foreach (var c in source.Children) { this.Refine(c.Value, sourceRootLevels, subjectRootLevels, subjectSnapshot, result); } }
protected IEnumerable <NodeRelation> RefineSourcingFromRelations(Node source, Node subject, ISubTreeSnapshot subjectSnapshot) { List <NodeRelation> result = new List <NodeRelation>(); foreach (var c in source.Children) { this.Refine(c.Value, source.GetPathLevelsFromRoot().ToArray(), subject.GetPathLevelsFromRoot().ToArray(), subjectSnapshot, result); } return(result); }