/// <inheritdoc /> public virtual void SetBackbone(IBackbone backbone) { if (this.Backbone != null) throw new InterfaceAlreadyAttachedToBackboneException (this.Name); if (! this.IsCompatibleWith (backbone)) throw new InterfaceNotCompatibleWithBackboneException (this.Name, backbone.Name); if (this.OnBeforeAttachBackbone != null) { try { this.OnBeforeAttachBackbone.Invoke (this, backbone); } catch {} } backbone.AttachEndPoint (this); this._backbone = backbone; }
public void SetBackbone(IBackbone backbone) { if (backbone == null) throw new ArgumentNullException (); if (this.Backbone != null) throw new ArgumentException (); if (this.OnBeforeAttachBackbone != null) this.OnBeforeAttachBackbone.Invoke (this, backbone); backbone.AttachEndPoint (this); this.Backbone = backbone; }