Exemplo n.º 1
0
 public void AttachBehavior(IQueueBehavior <T> behavior)
 {
     if (behavior != null)
     {
         _behaviors.Add(behavior);
     }
     behavior?.Attach(this);
 }
Exemplo n.º 2
0
        public void AttachBehavior(IQueueBehavior <T> behavior)
        {
            if (behavior == null)
            {
                return;
            }

            _behaviors.Add(behavior);
            behavior.Attach(this);
        }
Exemplo n.º 3
0
        public TBuilder AddBehavior(IQueueBehavior <T> behavior)
        {
            if (behavior == null)
            {
                throw new ArgumentNullException(nameof(behavior));
            }

            if (Target.Behaviors == null)
            {
                Target.Behaviors = new List <IQueueBehavior <T> > ();
            }
            Target.Behaviors.Add(behavior);

            return((TBuilder)this);
        }