Ejemplo n.º 1
0
        public virtual void Bind(IBinder targetBinder)
        {
            if (!CanBind(targetBinder))
            {
                throw new Exception();
            }

            this.Items.Add(targetBinder);

            if (targetBinder.CanBind(this))
            {
                targetBinder.Bind(this);
            }

            // Raise
            Binded?.Invoke(this, targetBinder);
        }
Ejemplo n.º 2
0
 protected virtual bool CanBind(IBinder outputBinder, IBinder inputBinder)
 {
     return(outputBinder.CanBind(inputBinder));
 }