Click or drag to resize

Notification Class

A Notification instance can be used to inform the user about various events. For a Notification instance to be displayed in Rhino, it must be added to the NotificationCenter. When added, it will be displayed in the Notifications panel in Rhino. A Notification contains 1 to 3 buttons that are automatically wired to its ButtonClicked Action if it is not null. The buttons are displayed when the Notification is shown modally by either the user clicking on a particular notification in the Notifications panel, or by programatically showing it using ShowModal. Currently, only process-wide notifications are supported; document specific notifications are not possible. Notification instances contain metadata that can be added, modified, or removed during its life. The metadata is important for LINQ queries and other patterns. For example, a particular action may require that multiple notifications be modified. Thus, a LINQ query can be performed on the NotificationCenter using metadata to retrieve related Notification objects and modify them as a batch. Notification objects implement IAssemblyRestrictedObject. By default, a Notification can be editedby any assembly, but explicitly specifing allowed assemblies in the constructor changes this behavior. Notification objects are not thread-safe and should only be manipulated in UI thread.
Inheritance Hierarchy
SystemObject
  Rhino.Runtime.NotificationsNotification

Namespace:  Rhino.Runtime.Notifications
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public class Notification : INotifyPropertyChanged, 
	IAssemblyRestrictedObject

The Notification type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAllowedAssemblies
The assemblies that can modify this instance.
Public propertyAlternateButtonTitle
The localized title of the Alternate button.
Public propertyButtonClicked
An Action that will be invoked whenever a button for the notification is clicked or the notification is closed.
Public propertyCancelButtonTitle
The localized title of the Cancel button.
Public propertyConfirmButtonTitle
The localized title of the Confirm button.
Public propertyDateUpdated
The date the notification was last modified.
Public propertyDescription
The description of the notification. The description is displayed in the Notifications panel in Rhino.
Public propertyItem
Gets or sets metadata for this instance.
Public propertyMessage
The message of the notification. The message is shown only when the instance is displayed modally. It should contain details about the notification.
Public propertyMetadataCopy
A copy of all the metadata for this class.
Public propertySeverityLevel
The severity of the notification. Changing the severity of the notification may change the way Rhino chooses to display the Notifications panel.
Public propertyShowEventId
A field used by Rhino for displaying notifications. Not intended for public use.
Public propertyTitle
The title of the notification. The title is displayed when the notification is displayed modally in Rhino.
Top
Methods
  NameDescription
Public methodEditable
Determines whether an assembly can modify the instance. Any code that modifies an assembly protected notification must be wrapped in a ExecuteAssemblyProtectedCode(Action) method.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodStatic memberExecuteAssemblyProtectedCode(Action)
If a Notification object is only allowed to be modified by certain assemblies, then any code that interacts with it must be wrapped around this method, or a InvalidOperationException will be thrown. For performance reasons, the code wrapped by this method should be kept as simple as possible.
Public methodStatic memberExecuteAssemblyProtectedCodeTResult(FuncTResult)
If a Notification object is only allowed to be modified by certain assemblies, then any code that interacts with it must be wrapped around this method, or a InvalidOperationException will be thrown. For performance reasons, the code wrapped by this method should be kept as simple as possible.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHideModal
Tells Rhino to hide the notification if it is being currently shown as a modal.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemoveMetadata
Removes metadata from this instance.
Public methodShowModal
Tells Rhino to display the notification modally.
Public methodToString
Returns a readable string representation of the instance.
(Overrides ObjectToString.)
Top
Events
  NameDescription
Public eventPropertyChanged
Triggered whenever a visible property of the instance changes.
Top
Version Information

Rhino for Windows

Supported in: 6.8
See Also