protected void Error_InvalidBindingPropertyValue(BindingElementProperty property)
 {
     errorReporter.Error(property.GetMetaInfo<SourceLocationInfo>(), "Incompatible value for property \"{0}\".", property.Name);
 }
Beispiel #2
0
        /// <summary>
        /// Processes binding element property node.
        /// </summary>
        /// <param name="node">The node.</param>
        private void Process_BindingProperty(dynamic node)
        {
            BindingElementProperty bindingElementProperty = new BindingElementProperty();

            // Map source location and node to object
            bindingElementProperty.AddMetaInfo(new SourceLocationInfo(node, context));
            context.AddObject(node, bindingElementProperty);

            // BindingElement
            try
            {
                NameContext.Current.CheckName(node.Name, typeof(BindingElementProperty));
                bindingElementProperty.BindingElement = (BindingElement)NameContext.Current.Scope;
            }
            catch (NameCollisionException exception)
            {
                Error_NameExists(bindingElementProperty, exception);
            }

            // Name
            bindingElementProperty.Name = node.Name;

            // Value
            bindingElementProperty.Value = this.Process(node.Value);
        }