public TupleValue(DataReference reference, int index) { var list = reference.Dereference(); Source = list as ISource; Index = index; }
public void ThenDerefernceMustResolveTheObject() { DataReference dataReference = new DataReference(Context, "testList"); var deref = dataReference.Dereference(); Assert.AreSame(deref, Context["testList"], "The context object was not resolved"); }
private DataReference CreateDataReference(JToken item) { string refersTo = (string) item["refersTo"]; DataReference result = new DataReference(DataReference.CurrentContext(), refersTo); result.DebugInfo = GetDebugInfo(item); return result; }
/// <summary> /// Initialise a new instance against a reference /// </summary> public When(DataReference reference, Op @operator, object rightHandSide) : this(reference.Dereference() as ISource, @operator, rightHandSide) { }
/// <summary> /// Initialise /// </summary> public SingleValue(DataReference reference) { Reference = reference; }
/// <summary> /// Create a new instance /// </summary> /// <example>{type:"formatString", format:"First{0}|Second{1}", source:{type:"reference", refersTo:"mySource"} }</example> public FormatString(DataReference reference, string formatString, bool suppressEndLine) { Source = reference; Format = formatString; SuppressEndLine = suppressEndLine; }
/// <summary> /// Initialise against a reference /// </summary> public ListSequence(DataReference reference) { ListItems = reference.Dereference() as IList<object>; }
public PadLeft(DataReference reference, int length, char character) : this(reference.Dereference() as ISource, length, character) { }
/// <summary> /// Initialise against a reference /// </summary> public Substring(DataReference reference, int start, int? length = null) : this(reference.Dereference() as ISource, start, length) { }