Exemplo n.º 1
0
 protected override void PublicizeEntityProperties( IEntityExtensionPublicationStorage publicDataStorage )
 {
     publicDataStorage.Publicize( this.Name, this.something );
 }
Exemplo n.º 2
0
 /// <summary>
 /// When overridden, an extension will have the chance to publicize any data so that it can
 /// be accessed by other extensions or from outside of the owning entity.
 /// </summary>
 /// <param name="publicDataStorage">The public storage into which data can be publicized using <see cref="IEntityExtensionPublicationStorage.Publicize"/></param>
 protected virtual void PublicizeEntityProperties( IEntityExtensionPublicationStorage publicDataStorage )
 {
 }
Exemplo n.º 3
0
        protected virtual void DisposeManaged()
        {
            if ( this.actionRequestBuffer != null )
            {
                lock ( this.actionRequestBufferLock )
                {
                    this.actionRequestBuffer.Clear();
                    this.actionRequestBuffer = null;
                }
            }

            if ( this.actionRequestTarget != null )
            {
                lock ( this.actionRequestTargetLock )
                {
                    this.actionRequestTarget = null;
                }
            }

            if ( this.publicData != null )
            {
                lock ( this.publicDataLock )
                {
                    this.publicData = null;
                }
            }

            if ( this.handledActionKeys != null )
            {
                lock ( this.handledActionKeysLock )
                {
                    this.handledActionKeys.Clear();
                    this.handledActionKeys = null;
                }
            }

            if ( this.System != null )
            {
                this.System.TaskStarted -= this.System_TaskStarted;
                this.System.TaskEnded -= this.System_TaskEnded;

                this.System = null;
            }

            if ( this.LogManager != null )
            {
                this.LogManager = null;
            }

            if ( this.Name != null )
            {
                this.Name = null;
            }
        }
Exemplo n.º 4
0
 public void Detatch( IActionRequestRegistry handlerRegistry, IUpdateRequester updateRequester )
 {
     this.PublicData = null;
     this.UnregisterActionHandlers( handlerRegistry );
     this.ActionRequestTarget = null;
     updateRequester.UpdateRequested -= this.PublicizeEntityProperties;
 }
Exemplo n.º 5
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;
        }
Exemplo n.º 6
0
 internal void FireUpdateRequestedEvent( IEntityExtensionPublicationStorage publicationStorage )
 {
     lock ( this.updateRequestedLock )
     {
         if ( this.updateRequested != null )
         {
             this.updateRequested( this.Properties as IEntityExtensionPublicationStorage );
         }
     }
 }