A reference to another named source object.
상속: IDebugInfoProvider
예제 #1
0
        public TupleValue(DataReference reference, int index)
        {
            var list = reference.Dereference();

            Source = list as ISource;

            Index = index;
        }
예제 #2
0
        public void ThenDerefernceMustResolveTheObject()
        {
            DataReference dataReference = new DataReference(Context, "testList");

            var deref = dataReference.Dereference();

            Assert.AreSame(deref, Context["testList"], "The context object was not resolved");
        }
예제 #3
0
        private DataReference CreateDataReference(JToken item)
        {
            string refersTo = (string) item["refersTo"];
            DataReference result = new DataReference(DataReference.CurrentContext(), refersTo);

            result.DebugInfo = GetDebugInfo(item);

            return result;
        }
예제 #4
0
 /// <summary>
 /// Initialise a new instance against a reference
 /// </summary>
 public When(DataReference reference, Op @operator, object rightHandSide)
     : this(reference.Dereference() as ISource, @operator, rightHandSide)
 {
 }
예제 #5
0
 /// <summary>
 /// Initialise
 /// </summary>
 public SingleValue(DataReference reference)
 {
     Reference = reference;
 }
예제 #6
0
 /// <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;
 }
예제 #7
0
 /// <summary>
 /// Initialise against a reference
 /// </summary>
 public ListSequence(DataReference reference)
 {
     ListItems = reference.Dereference() as IList<object>;
 }
예제 #8
0
 public PadLeft(DataReference reference, int length, char character)
     : this(reference.Dereference() as ISource, length, character)
 {
 }
예제 #9
0
 /// <summary>
 /// Initialise against a reference
 /// </summary>
 public Substring(DataReference reference, int start, int? length = null)
     : this(reference.Dereference() as ISource, start, length)
 {
 }