public void Visit(IVisitable visitable) { visitable.Accept(Tags); visitable.Accept(this); foreach (ScenarioDefinition scenario in Children) { scenario.Visit(visitable); } }
public void Accept(IVisitor visitor) { collection.Accept(visitor); visitor.DuringTake(); count.Accept(visitor); visitor.AfterTake(); }
public void Accept(IVisitor visitor) { visitor.BeforeSelect(); selection.Accept(visitor); visitor.DuringSelect(); @from.Accept(visitor); }
protected virtual bool WriteSlots(IVisitable slotChangeTree) { var ret = new BooleanByRef(); slotChangeTree.Accept(new _IVisitor4_39(this, ret)); return(ret.value); }
/// <summary> /// Runs all the subscribed visitors against the visitable tree /// parsed by the ITraverser implementation. /// </summary> /// <param name="source">The <c>RunnerSource</c> object to process.</param> private void RunSource(RunnerSource source) { GeneratorHost.Instance.Extender.Traverser.Initialize(GeneratorHost.Instance); // Build the result tree to use. IVisitable result = GeneratorHost.Instance.Extender.Traverser.Traverse(source.FileName); foreach (DictionaryEntry entry in GeneratorHost.Instance.Extender.Visitors) { IVisitor visitor = entry.Value as IVisitor; // If the element implements IHostedComponent, initialize it // with the GeneratorHost instance. if (visitor is IHostedComponent) { ((IHostedComponent)visitor).Initialize(GeneratorHost.Instance); } // If the element implements INotifier, append the progress event handler. if (visitor is INotifier) { // Remove it just in case it was already subscribed. ((INotifier)visitor).Progress -= new ProgressEventHandler(OnBubbleProgress); ((INotifier)visitor).Progress += new ProgressEventHandler(OnBubbleProgress); } result.Accept(visitor); } }
private int CountSlotChanges(IVisitable slotChanges) { IntByRef slotChangeCount = new IntByRef(); slotChanges.Accept(new _IVisitor4_40(slotChangeCount)); return(slotChangeCount.value); }
private LoadedDocument CreateLoadedDocument( IVisitable <IGenericVisitor> type, string namespaceName, Action <LoadedDocument> addToDocumentAction, Action <Namespace> addToNamespaceAction) { type.Accept(new FixMethodBodyVisitor()); LoadedDocument document = new LoadedDocument(); if (string.IsNullOrWhiteSpace(namespaceName)) { addToDocumentAction(document); } else { Namespace @namespace = new Namespace() { Name = namespaceName, }; addToNamespaceAction(@namespace); document.Namespaces.Add(@namespace); } return(document); }
protected void VisitChildren(params object[] children) { foreach (object child in children) { IVisitable <IGenericVisitor> item = child as IVisitable <IGenericVisitor>; if (item != null) { item.Accept(this); } else { IEnumerable <IVisitable <IGenericVisitor> > collection = child as IEnumerable <IVisitable <IGenericVisitor> >; if (collection != null) { foreach (IVisitable <IGenericVisitor> childItem in collection) { childItem.Accept(this); } } } if (Result != null) { return; } } }
public CodeGenerationTreeBuilder(IVisitable <IGenericVisitor> visitable) { if (visitable != null) { visitable.Accept(this); } }
private int EstimateMappingCount(IVisitable slotChanges) { IntByRef count = new IntByRef(); count.value = _ids == null ? 0 : _ids.Size(); slotChanges.Accept(new _IVisitor4_103(count)); return(count.value); }
public void Accept(IVisitor visitor) { value.Accept(visitor); visitor.BeforeBetween(); min.Accept(visitor); visitor.DuringBetween(); max.Accept(visitor); }
public void Accept(IVisitor visitor) { visitor.BeforeWhen(); condition.Accept(visitor); visitor.DuringWhen(); value.Accept(visitor); visitor.AfterWhen(); }
public void Accept(IVisitor visitor) { visitor.BeforeBinaryOperator(); left.Accept(visitor); visitor.DuringBinaryOperator(this.Type); right.Accept(visitor); visitor.AfterBinaryOperator(); }
public void Visit(IVisitable visitable) { visitable.Accept(this); if (Argument != null) { Argument.Visit(visitable); } }
public void VisitReferencedApplicationBinding(IVisitable <IApplicationBindingVisitor> referencedApplicationBinding) { if (referencedApplicationBinding == null) { throw new ArgumentNullException(nameof(referencedApplicationBinding)); } referencedApplicationBinding.Accept(this); }
public void VisitNode(IVisitable visitable) { if (visitable == null) { return; } visitable.Accept(this); }
public static string ToSourceCode( this IVisitable <IGenericVisitor> visitable, params ISourceCodeStyleRule[] styleRules) { SourceCodeStepsBuilder stepsBuilder = new SourceCodeStepsBuilder(); visitable.Accept(stepsBuilder); return(stepsBuilder.Steps.ToSourceCode(styleRules)); }
public Construct Visit(IVisitable <Constructs.Construct, LlvmVisitor> node) { // Ensure node is not null. if (node != null) { return(node.Accept(this)); } throw new ArgumentNullException("Node argument cannot be null"); }
public string getStringForIVisitable(int y, int x) { IVisitable myVisitable = GameController.Game.getMap()[y, x]; if (myVisitable == null) { return(" "); } myVisitable.Accept(this); return(objectToRepresent); }
public override void OnConfigured(CameraCaptureSession session) { _visitable.Accept(this); if (_cameraParameters.CameraDevice == null) { return; } _args.CameraCaptureSession = session; OnConfigured(this, _args); }
void IVisitable.Accept(IVisitor visitor) { foreach (T item in this) { IVisitable visitable = item as IVisitable; if (visitable == null) { throw new NotImplementedException("items must be implement IVistitable"); } visitable.Accept(visitor); } }
// do nothing public virtual void Commit(IVisitable slotChanges, FreespaceCommitter freespaceCommitter ) { var oldSlot = _slot; var reservedSlot = AllocateSlot(false, EstimatedSlotLength(EstimateMappingCount( slotChanges))); // No more operations against the FreespaceManager. // Time to free old slots. freespaceCommitter.Commit(); slotChanges.Accept(new _IVisitor4_69(this)); WriteThis(reservedSlot); FreeSlot(oldSlot); }
// do nothing public virtual void Commit(IVisitable slotChanges, FreespaceCommitter freespaceCommitter ) { Slot oldSlot = _slot; Slot reservedSlot = AllocateSlot(false, EstimatedSlotLength(EstimateMappingCount( slotChanges))); // No more operations against the FreespaceManager. // Time to free old slots. freespaceCommitter.Commit(); slotChanges.Accept(new _IVisitor4_69(this)); WriteThis(reservedSlot); FreeSlot(oldSlot); }
private IBankMessage FindVisitorResult(IEnumerable <IVisitor> visitors, IVisitable visitable) { foreach (IVisitor visitor in visitors) { visitable.Accept(visitor); if (!visitor.IsHandled) { continue; } _configEnforcer.EnforceFieldLengthValidation(visitor); return(visitor.Result); } throw new ProviderMissingException(); }
public virtual void Commit(IVisitable slotChanges, FreespaceCommitter freespaceCommitter ) { _container.FreespaceManager().BeginCommit(); slotChanges.Accept(new _IVisitor4_129(this)); // TODO: Maybe we want a BTree that doesn't allow duplicates. // Then we could do the following in one step without removing first. _bTree.Commit(Transaction()); IdGeneratorValue(_idGenerator.PersistentGeneratorValue()); if (_idGenerator.IsDirty()) { _idGenerator.SetClean(); _persistentState.SetStateDirty(); } if (_persistentState.IsDirty()) { _persistentState.Write(Transaction()); } _container.FreespaceManager().EndCommit(); _transactionalIdSystem.Commit(freespaceCommitter); _transactionalIdSystem.Clear(); }
public virtual void ReturnUnusedIds(IVisitable visitable) { visitable.Accept(new _IVisitor4_167(this)); }
public void ReturnUnusedIds(IVisitable visitable) { visitable.Accept(new _IVisitor4_51(this)); }
private int CountSlotChanges(IVisitable slotChanges) { IntByRef slotChangeCount = new IntByRef(); slotChanges.Accept(new _IVisitor4_40(slotChangeCount)); return slotChangeCount.value; }
public void Accept(IVisitor visitor) { value.Accept(visitor); visitor.DuringAliasDefinition(this.Alias); }
protected void AppendSlotChanges(ByteArrayBuffer writer, IVisitable slotChangeVisitable ) { slotChangeVisitable.Accept(new _IVisitor4_30(writer)); }
private int EstimateMappingCount(IVisitable slotChanges) { IntByRef count = new IntByRef(); count.value = _ids == null ? 0 : _ids.Size(); slotChanges.Accept(new _IVisitor4_103(count)); return count.value; }
/// <summary> /// Visits the node. /// </summary> /// <param name="visitable">The visitable.</param> public void VisitNode(IVisitable visitable) { if (visitable == null) return; visitable.Accept(this); }
public void Accept(IVisitor visitor) { collection.Accept(visitor); visitor.BeforeOrderBy(); criteria.Accept(visitor); }
protected virtual bool WriteSlots(IVisitable slotChangeTree) { BooleanByRef ret = new BooleanByRef(); slotChangeTree.Accept(new _IVisitor4_39(this, ret)); return ret.value; }
protected override void AcceptVisitable(IVisitable visitable) { visitable.Accept(this); }