Made events nullable
This commit is contained in:
parent
630f014c1a
commit
838fbdf94e
@ -6,7 +6,7 @@ internal static class AppEvents
|
|||||||
{
|
{
|
||||||
#region Event: Settings were
|
#region Event: Settings were
|
||||||
|
|
||||||
internal static event EventHandler WhenSettingsChanged;
|
internal static event EventHandler? WhenSettingsChanged;
|
||||||
|
|
||||||
internal static void SettingsChanged() => WhenSettingsChanged?.Invoke(null, EventArgs.Empty);
|
internal static void SettingsChanged() => WhenSettingsChanged?.Invoke(null, EventArgs.Empty);
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ internal static class AppEvents
|
|||||||
#region Event: Section was changed
|
#region Event: Section was changed
|
||||||
|
|
||||||
// Section changed event which can be subscribed:
|
// Section changed event which can be subscribed:
|
||||||
internal static event EventHandler<Section> WhenSectionChanged;
|
internal static event EventHandler<Section>? WhenSectionChanged;
|
||||||
|
|
||||||
// Method to raise the section changed event:
|
// Method to raise the section changed event:
|
||||||
internal static void SectionChanged(Section section) => WhenSectionChanged?.Invoke(null, section);
|
internal static void SectionChanged(Section section) => WhenSectionChanged?.Invoke(null, section);
|
||||||
@ -25,7 +25,7 @@ internal static class AppEvents
|
|||||||
#region Event: Text element was changed
|
#region Event: Text element was changed
|
||||||
|
|
||||||
// Text element changed event which can be subscribed:
|
// Text element changed event which can be subscribed:
|
||||||
internal static event EventHandler<TextElement?> WhenTextElementChanged;
|
internal static event EventHandler<TextElement?>? WhenTextElementChanged;
|
||||||
|
|
||||||
// Method to raise the text element changed event:
|
// Method to raise the text element changed event:
|
||||||
internal static void TextElementChanged(TextElement? textElement) => WhenTextElementChanged?.Invoke(null, textElement);
|
internal static void TextElementChanged(TextElement? textElement) => WhenTextElementChanged?.Invoke(null, textElement);
|
||||||
@ -35,7 +35,7 @@ internal static class AppEvents
|
|||||||
#region Translation was changed
|
#region Translation was changed
|
||||||
|
|
||||||
// Translation changed event which can be subscribed:
|
// Translation changed event which can be subscribed:
|
||||||
internal static event EventHandler<Translation?> WhenTranslationChanged;
|
internal static event EventHandler<Translation?>? WhenTranslationChanged;
|
||||||
|
|
||||||
// Method to raise the translation changed event:
|
// Method to raise the translation changed event:
|
||||||
internal static void TranslationChanged(Translation? translation) => WhenTranslationChanged?.Invoke(null, translation);
|
internal static void TranslationChanged(Translation? translation) => WhenTranslationChanged?.Invoke(null, translation);
|
||||||
|
Loading…
Reference in New Issue
Block a user