/// <summary>
        ///   Constructs a new input reference, from the specified input key and chain of member references.
        /// </summary>
        /// <param name = "key">The key.</param>
        /// <param name = "memberChain">The member chain.</param>
        public InputReference(InputKey key, IEnumerable <InputMemberReference> memberChain)
        {
            this.key        = key;
            invocationChain = memberChain;
            var names = new[] { key.Label }.Concat(memberChain.Select(x => x.ToString()));

            localName     = string.Join("_", names);
            preProcessing = ProcessingQueue.Empty();
            preProcessing = memberChain.Any() ? preProcessing.Extend(new ReferenceMemberStep(memberChain)) : preProcessing;
        }
Example #2
0
 public static IToken DefineInjection(string name, IEnumerable <InputReference> inputs)
 {
     return(new UnresolvedToken(new TokenKey(name, TokenType.Injection), inputs, ProcessingQueue.Empty()));
 }
Example #3
0
 public static IToken DefineLiteral(string name)
 {
     return(new ResolvedToken
                (new TokenKey(name, TokenType.Literal), Enumerable.Empty <InputReference>(), ProcessingQueue.Empty(), name));
 }
Example #4
0
 public ResolvedToken(TokenKey key, IEnumerable <InputReference> inputs, ProcessingQueue queue, string value)
     : base(key, inputs, queue)
 {
     this.value = value;
 }
Example #5
0
 /// <summary>
 ///   Constructs a new token with the specified parameters.
 /// </summary>
 /// <param name = "key"></param>
 /// <param name = "inputs"></param>
 /// <param name = "pQueue"></param>
 protected BaseToken(TokenKey key, IEnumerable <InputReference> inputs, ProcessingQueue pQueue)
 {
     this.key        = key;
     this.inputs     = inputs;
     processingQueue = pQueue;
 }
Example #6
0
 public UnresolvedToken(TokenKey key, IEnumerable <InputReference> inputs, ProcessingQueue processing)
     : base(key, inputs, processing)
 {
 }