private ResolvedBinding ProcessBinding(DothtmlBindingNode node, DataContextStack context)
        {
            var        value          = node.Value;
            var        bindingOptions = controlResolver.ResolveBinding(node.Name);
            Expression expression     = null;
            Exception  parsingError   = null;

            try
            {
                expression = bindingParser.Parse(value, context, bindingOptions);
            }
            catch (Exception exception)
            {
                parsingError = exception;
            }
            return(new ResolvedBinding()
            {
                BindingType = bindingOptions.BindingType,
                Value = node.Value,
                Expression = expression,
                DataContextTypeStack = context,
                ParsingError = parsingError,
                BindingNode = node
            });
        }
        /// <summary>
        /// Processes the binding node.
        /// </summary>
        public IAbstractBinding ProcessBinding(DothtmlBindingNode node, IDataContextStack context, IPropertyDescriptor property)
        {
            var bindingOptions = controlResolver.ResolveBinding(node.Name);

            if (bindingOptions == null)
            {
                node.NameNode.AddError($"Binding {node.Name} could not be resolved.");
                bindingOptions = controlResolver.ResolveBinding("value"); // just try it as with value binding
            }

            if (context != null && context.NamespaceImports.Count > 0)
            {
                bindingOptions = bindingOptions.AddImports(context.NamespaceImports);
            }

            return(CompileBinding(node, bindingOptions, context, property));
        }