public void Accept(IValueVisitor visitor) { visitor.Visit(Normal); visitor.Visit(A); visitor.Visit(B); visitor.Visit(C); }
public void Accept(IValueVisitor visitor) { foreach (var v in Values) { v.Accept(visitor); } }
public CollectionGraphTraveller(IGraphTraveller <TElement> elementTraveller, SerializationInstanceFactory instanceFactory) { _elementTraveller = elementTraveller; if (elementTraveller == null) { _valueVisitor = ValueVisitor.Create <TElement>(); } else { _instanceFactory = instanceFactory; _elementType = typeof(TElement); } }
public DictionaryGraphTraveller(IGraphTraveller <TKey> keyTraveller, IGraphTraveller <TValue> valueTraveller, SerializationInstanceFactory instanceFactory) { _keyTraveller = keyTraveller; _valueTraveller = valueTraveller; _instanceFactory = instanceFactory; if (keyTraveller == null) { _keyVisitor = ValueVisitor.Create <TKey>(); } else { _keyType = typeof(TKey); } if (valueTraveller == null) { _valueVisitor = ValueVisitor.Create <TValue>(); } else { _valueType = typeof(TValue); } }
/// <summary> /// Accept a visitor /// </summary> /// <param name="visitor"></param> public abstract void Accept(IValueVisitor visitor);
public override void Accept(IValueVisitor visitor) { visitor.Visit(this); }
public TResult AcceptConverter <TResult, TContext>(IValueVisitor <TResult, TContext> converter, TContext context) { return(converter.VisitString((IStringValue)this, context)); }
public void Accept(IValueVisitor visitor) => visitor.Visit(this);
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitUndefinedValue(this); }
public void Visit(IValueVisitor visitor) { visitor.Deserialize(this.value); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitAnyArrayValue(this); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitAnyObjectValue(this); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitAnyLongintValue(this); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitAnyIntegerValue(this); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitAnyNumericValue(this); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitConcreteValue(this); }
public void Visit(IValueVisitor visitor) { visitor.Deserialize(this.keyValuePairs); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitIntervalFloatValue(this); }
public override void Accept(IValueVisitor visitor) { throw new System.NotImplementedException(); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitAnyResourceValue(this); }
T IValue.Accept <T> (IValueVisitor <T> visitor) { return(visitor.Visit(this)); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitAnyScalarValue(this); }
public abstract void Visit(IValueVisitor visitor);
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitAnyBooleanValue(this); }
public object Accept(IValueVisitor visitor) { return visitor.Accept(this); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitAssociativeArray(this); }
/// <summary> /// Accept a visitor with a return value /// </summary> /// <typeparam name="T">Type of the return value</typeparam> /// <param name="visitor"></param> public abstract T Accept <T>(IValueVisitor <T> visitor);
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitCompoundValue(this); }
public override T Accept <T>(IValueVisitor <T> visitor) { return(visitor.Visit(this)); }
/// <inheritdoc /> public override void Accept(IValueVisitor visitor) { visitor.VisitNativeTypeValue(this); }
public object Accept(IValueVisitor visitor) { return(visitor.Accept(this)); }
public TResult AcceptConverter <TResult, TContext>(IValueVisitor <TResult, TContext> converter, TContext context) { return(converter.VisitBoolean(this, context)); }