Example #1
0
        public BindingBuilderBase(IBindingContext context, object target)
        {
            if (target == null)
            {
                throw new ArgumentNullException("target");
            }
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            this.context = context;
            this.target  = target;

            this.description = new BindingDescription();
        }
Example #2
0
        public ITargetProxy CreateProxy(object target, BindingDescription description)
        {
            try
            {
                ITargetProxy proxy = null;
                if (TryCreateProxy(target, description, out proxy))
                {
                    return(proxy);
                }

                throw new NotSupportedException("Not found available proxy factory.");
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Example #3
0
 public IBinding Create(IBindingContext bindingContext, object source, object target, BindingDescription bindingDescription)
 {
     return(new Binding.Binding(bindingContext, source, target, bindingDescription, this.sourceProxyFactory, this.targetProxyFactory));
 }
Example #4
0
 public IBinding Bind(IBindingContext bindingContext, object source, object target, BindingDescription bindingDescription)
 {
     return(factory.Create(bindingContext, source, target, bindingDescription));
 }
Example #5
0
 protected virtual bool TryCreateProxy(object target, BindingDescription description, out ITargetProxy proxy)
 {
     proxy = null;
     return(false);
 }