Exemplo n.º 1
0
 /// <summary>
 ///     Adds behavior
 /// </summary>
 /// <param name="behavior"></param>
 /// <returns></returns>
 public Component AddBehavior(IBehavior behavior)
 {
     if (!Behaviors.Any(b => b.Name == behavior.Name))
     {
         Behaviors.Add(behavior);
     }
     return(this);
 }
Exemplo n.º 2
0
 /// <inheritdoc/>
 public virtual bool UsesBehavior(Type behaviorType) => Behaviors.Any(b => b.Equals(behaviorType));