public override void VisitPropertyBinding(ResolvedPropertyBinding propertyBinding)
 {
     if(BindingCompiler != null)
     {
         // try to compile bindings to see errors
         try
         {
             BindingCompiler.PrecompileBinding(propertyBinding.Binding, "id123", propertyBinding.Property.PropertyType);
         }
         catch(Exception exception)
         {
             Result.Errors.Add(exception);
         }
     }
     base.VisitPropertyBinding(propertyBinding);
 }
        public override void VisitPropertyBinding(ResolvedPropertyBinding propertyBinding)
        {
            var binding = propertyBinding.Binding;
            var expression = binding.Expression;
            var startToken = binding.BindingNode.ValueNode.ValueToken;
            var startTokenIndex = binding.BindingNode.ValueNode.Tokens.FindElement(t => t == startToken);
            if (startTokenIndex.list != null && startTokenIndex.list.Count > startTokenIndex.from + 1)
            {
                var nextToken = startTokenIndex.list[startTokenIndex.from + 1];
                binding.DebugInfo = Expression.DebugInfo(symbolDoc,
                    startToken.LineNumber,
                    startToken.ColumnNumber + 1,
                    nextToken.LineNumber,
                    nextToken.ColumnNumber + 1);

            }
            base.VisitPropertyBinding(propertyBinding);
        }
示例#3
0
 public override void VisitPropertyBinding(ResolvedPropertyBinding propertyBinding)
 {
     emitter.EmitSetBinding(controlName, propertyBinding.Property.DescriptorFullName, ProcessBinding(propertyBinding.Binding, propertyBinding.Property.IsBindingProperty ? typeof(object) : propertyBinding.Property.PropertyType));
     base.VisitPropertyBinding(propertyBinding);
 }