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();
        }
Exemple #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;
            }
        }
Exemple #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));
 }
Exemple #4
0
 public IBinding Bind(IBindingContext bindingContext, object source, object target, BindingDescription bindingDescription)
 {
     return(factory.Create(bindingContext, source, target, bindingDescription));
 }
Exemple #5
0
 protected virtual bool TryCreateProxy(object target, BindingDescription description, out ITargetProxy proxy)
 {
     proxy = null;
     return(false);
 }