Editor Settings for MessageTypes
You can adjust which Editor features your MessageType should use. This is useful if you want to hide your MessageType from Editor windows like the Info Window or if you want to create code-only MessageTypes without EditorMessageObject.
The Editor Settings are applied by adding the MessageTypeEditorSettings
attribute to your MessageType. It is automatically added when you create Messages using the Editor.
The following example shows a code-only MessageType. It is not displayed in GlobalMessage's Editor windows and does not use an associated EditorMessageObject.
using MalteHusung.GlobalMessage;
[MessageTypeEditorSettings(Description = "This is my code-only MessageType.", UseEditorFeatures = false, UseEditorMessageObject = false)]
public class MyNewMessage : MessageType
{
}
Tip
Setting UseEditorMessageObject
to false does not automatically delete already existing EMOs for that MessageType from the project. You have to delete them manually.
Note
You can create code-only MessageTypes via the Editor directly. In the creation context menu choose Create > GlobalMessage > Code Only > MessageType
.