public DisposableBehaviorContainer ( IStatelessBehavior <T> behavior, T objectTheBehaviorIsAttachedTo ) { TheBehavior = behavior; TheObjectTheBehaviorIsAttachedTo = objectTheBehaviorIsAttachedTo; TheBehavior.Attach(TheObjectTheBehaviorIsAttachedTo); }
public static void Reset <T>(this IStatelessBehavior <T> behavior, T obj, bool resetItems = true) { behavior.Detach(obj, resetItems); behavior.Attach(obj, resetItems); }