/// <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);
 }
Exemple #2
0
 /// <inheritdoc/>
 public virtual bool UsesBehavior(Type behaviorType) => Behaviors.Any(b => b.Equals(behaviorType));