protected override void PublicizeEntityProperties( IEntityExtensionPublicationStorage publicDataStorage ) { publicDataStorage.Publicize( this.Name, this.something ); }
/// <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 ) { }
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; } }
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; }
internal void FireUpdateRequestedEvent( IEntityExtensionPublicationStorage publicationStorage ) { lock ( this.updateRequestedLock ) { if ( this.updateRequested != null ) { this.updateRequested( this.Properties as IEntityExtensionPublicationStorage ); } } }