private void AssertConverterBehaviorForVersion(int converterVersion) { var stage = new RecordingStage(converterVersion ); Converter.Convert(stage); Iterator4Assert.AreEqual(Iterators.Iterator(ExpectedConversionsFor(converterVersion )), Iterators.Iterator(stage.Conversions())); }
private void AssertConverterBehaviorForVersion(int converterVersion) { var stage = new RecordingStage(converterVersion ); Converter.Convert(stage); Iterator4Assert.AreEqual(Iterators.Iterator(ExpectedConversionsFor(converterVersion )), Iterators.Iterator(stage.Conversions())); }
internal virtual void Record(RecordingStage stage, MappedToken token) { if (token.Nodes.Any(node => node.Node == Node)) { return; } token.Nodes.Add(this); }
internal override void Record(RecordingStage stage, MappedToken token) { switch (stage) { case RecordingStage.Completed: var macro = token.Nodes.Where( node => (node.Node is MacroStatement && ((MacroStatement)node.Node).Name == ((ReferenceExpression)Node).Name) ).FirstOrDefault(); if (macro != null) token.Nodes.Remove(macro); break; default: break; } base.Record(stage, token); }
internal override void Record(RecordingStage stage, MappedToken token) { switch (stage) { case RecordingStage.Completed: var macro = token.Nodes.Where( node => (node.Node is MacroStatement && ((MacroStatement)node.Node).Name == ((ReferenceExpression)Node).Name) ).FirstOrDefault(); if (macro != null) { token.Nodes.Remove(macro); } break; default: break; } base.Record(stage, token); }
internal override void Record(RecordingStage stage, MappedToken token) { switch (stage) { case RecordingStage.Completed: var oldref = token.Nodes.Where( node => (node.Node.NodeType == NodeType.ReferenceExpression && ((ReferenceExpression)node.Node).Name == ((ReferenceExpression)Node).Name) ).FirstOrDefault(); if (oldref != null) { token.Nodes.Remove(oldref); base.Record(stage, token); } break; default: base.Record(stage, token); break; } }
internal virtual void Record(RecordingStage stage, MappedToken token) { token.Nodes.Add(this); }
internal void MapNode(RecordingStage stage, MappedNode node) { TokensForNode(node, token => node.Record(stage, token)); }
internal virtual void Record(RecordingStage stage, MappedToken token) { token.Nodes.Add(this); }
internal void MapNode(RecordingStage stage, MappedNode node) { TokensForNode(node, token => node.Record(stage, token)); }
/// <summary> /// Initializes a new instance of the <see cref="ScreenGunFileViewModel"/> class. /// </summary> /// <param name="outputFilePath"> /// The output file path. /// </param> /// <param name="stage"> /// The stage. /// </param> public ScreenGunFileViewModel(string outputFilePath, RecordingStage stage = RecordingStage.Done) { this.FileName = Path.GetFileName(outputFilePath); this.FilePath = outputFilePath; this.RecordingStage = stage; }
internal override void Record(RecordingStage stage, MappedToken token) { switch (stage) { case RecordingStage.Completed: var oldref = token.Nodes.Where( node => (node.Node.NodeType == NodeType.ReferenceExpression && ((ReferenceExpression)node.Node).Name == ((ReferenceExpression)Node).Name) ).FirstOrDefault(); if (oldref != null) { token.Nodes.Remove(oldref); base.Record(stage, token); } break; default: base.Record(stage, token); break; } }
/// <summary> /// Initializes a new instance of the <see cref="RecorderState"/> class. /// </summary> /// <param name="stage"> /// The stage. /// </param> public RecorderState(RecordingStage stage) { this.Stage = stage; }
internal virtual void Record(RecordingStage stage, MappedToken token) { if (token.Nodes.Any(node => node.Node == Node)) return; token.Nodes.Add(this); }