public void Detatch( IActionRequestRegistry handlerRegistry, IUpdateRequester updateRequester ) { this.PublicData = null; this.UnregisterActionHandlers( handlerRegistry ); this.ActionRequestTarget = null; updateRequester.UpdateRequested -= this.PublicizeEntityProperties; }
public void Attatch( IActionRequestRegistry handlerRegistry, IEntityExtensionPublicationStorage storage, IActionRequestable actionRequestTarget, IUpdateRequester updateRequester ) { if ( storage == null ) { throw new ArgumentNullException( "storage", "The given data storage must not be null." ); } if ( handlerRegistry == null ) { throw new ArgumentNullException( "handlerRegistry", "The handler registry must not be null." ); } if ( actionRequestTarget == null ) { throw new ArgumentNullException( "actionRequestTarget", "The action request target must not be null." ); } this.PublicData = storage; this.RegisterActionHandlers( handlerRegistry ); this.ActionRequestTarget = actionRequestTarget; this.PublicizeEntityProperties( storage ); updateRequester.UpdateRequested += this.PublicizeEntityProperties; }