public static void Apply <T>(IBehaviorMarker behavior, T target) where T : IElement { var actions = GetExecuteActions(behavior.GetType(), target.GetType()); foreach (var action in actions) { action(behavior, target); } }
/// <summary> /// Apply behavior to an object. /// </summary> /// <param name="behavior">The behavior to apply.</param> /// <param name="target">The target element to apply behavior to.</param> public static IBehaviorMarker ApplyTo <T>(this IBehaviorMarker behavior, T target) where T : IElement { CacheingBehaviorApplier.Apply(behavior, target); return(behavior); }