public DisposableBehaviorContainer
        (
            IStatelessBehavior <T> behavior,
            T objectTheBehaviorIsAttachedTo
        )
        {
            TheBehavior = behavior;
            TheObjectTheBehaviorIsAttachedTo = objectTheBehaviorIsAttachedTo;

            TheBehavior.Attach(TheObjectTheBehaviorIsAttachedTo);
        }
Exemplo n.º 2
0
 public static void Reset <T>(this IStatelessBehavior <T> behavior, T obj, bool resetItems = true)
 {
     behavior.Detach(obj, resetItems);
     behavior.Attach(obj, resetItems);
 }