ElectronNET API: Add platform support attributes

This commit is contained in:
softworkz
2025-11-14 09:44:01 +01:00
parent 8e8d88c48f
commit 0580942a59
11 changed files with 167 additions and 13 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Runtime.Versioning;
using System.Text.Json.Serialization;
namespace ElectronNET.API.Entities
@@ -43,6 +44,8 @@ namespace ElectronNET.API.Entities
/// <summary>
/// The timeout duration of the notification. Can be 'default' or 'never'.
/// </summary>
[SupportedOSPlatform("Linux")]
[SupportedOSPlatform("Windows")]
public string TimeoutType { get; set; }
/// <summary>
@@ -58,6 +61,7 @@ namespace ElectronNET.API.Entities
/// <summary>
/// The urgency level of the notification. Can be 'normal', 'critical', or 'low'.
/// </summary>
[SupportedOSPlatform("Linux")]
public string Urgency { get; set; }
/// <summary>
@@ -127,6 +131,7 @@ namespace ElectronNET.API.Entities
/// The string the user entered into the inline reply field
/// </summary>
[JsonIgnore]
[SupportedOSPlatform("macOS")]
public Action<string> OnReply { get; set; }
/// <summary>
@@ -142,6 +147,7 @@ namespace ElectronNET.API.Entities
/// macOS only - The index of the action that was activated
/// </summary>
[JsonIgnore]
[SupportedOSPlatform("macOS")]
public Action<string> OnAction { get; set; }
/// <summary>
@@ -164,4 +170,4 @@ namespace ElectronNET.API.Entities
Body = body;
}
}
}
}