Click or drag to resize

PoolBaseTSource, TInstance, TSettingsNotificationMode Property

[This is preliminary documentation and is subject to change.]

Gets or sets the modes in which pooled objects are notified of their acquisition from, and release to, the pool.

Namespace:  Umbrace.Unity.PurePool
Assembly:  Umbrace.Unity.PurePool (in Umbrace.Unity.PurePool.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public abstract NotificationMode NotificationMode { get; set; }

Property Value

Type: NotificationMode

Implements

ISharedPoolSettingsNotificationMode
Remarks

Depending on the modes chosen, the pool will inform the components on the pooled object in different ways. The modes can be combined to support components on the same object that require differing modes.

If a component needs to handle the notification but its class cannot be modified, a separate component should be created and attached to the object, which will handle the notification on the original component's behalf.

Notification ModeDescription
Interface

A custom interface that is applied to any components that need to respond to the notification.

Components attached to the pooled object should implement the IPoolable interface if they wish to perform actions when the object is acquired from, or released to, the pool.

SendMessage

The built-in Unity messaging system that sends notifications using the SendMessage(String) method.

Components attached to the pooled object should implement the OnAcquire method to receive a notification when the object is acquired from the pool, and the OnRelease method to receive a notification when the object is released back to the pool.

UnityMessagingInterface

The built-in Unity messaging system that sends notifications using the ExecuteEvents class, using an interface applied to any components that need to respond to the notification.

See Also