/// <summary> /// Parses the configuration and builds the corresponding <see cref="LateBindingNode"/>. /// </summary> /// <returns>a node representing the AST of the configuration</returns> public LateBindingNode Parse() { LateBindingNode currentNode = null; foreach (var node in ParseTokens()) { if (currentNode == null) { currentNode = node; continue; } var concatenationNode = currentNode as ConcatenationNode; if (concatenationNode != null) { concatenationNode.Add(node); } else { currentNode = new ConcatenationNode(currentNode, node); } } return(currentNode); }
/// <summary> /// Adds a new child to the current node. /// </summary> /// <param name="child">the new child</param> public void Add(LateBindingNode child) { _children.Add(child); }
/// <summary> /// Constructs a new <see cref="LateBindingInjectionValue{T}"/> /// </summary> /// <param name="configuration">the late binding configuration</param> public LateBindingInjectionValue(string configuration) : base(typeof(T)) { _node = new LateBindingConfigurationParser(configuration).Parse(); }
private IDependencyResolverPolicy DoGetResolverPolicy(LateBindingNode node) { throw new InvalidOperationException(string.Format("Invalid expression at {0}.", node.Position.Start)); }