Exemplo n.º 1
0
 public void Detatch( IActionRequestRegistry handlerRegistry, IUpdateRequester updateRequester )
 {
     this.PublicData = null;
     this.UnregisterActionHandlers( handlerRegistry );
     this.ActionRequestTarget = null;
     updateRequester.UpdateRequested -= this.PublicizeEntityProperties;
 }
Exemplo n.º 2
0
        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;
        }