mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
31 lines
732 B
C#
31 lines
732 B
C#
|
|
using Avalonia.Controls;
|
||
|
|
|
||
|
|
namespace LanMountainDesktop.PluginSdk;
|
||
|
|
|
||
|
|
public sealed class PluginSettingsPageRegistration
|
||
|
|
{
|
||
|
|
public PluginSettingsPageRegistration(
|
||
|
|
string id,
|
||
|
|
string title,
|
||
|
|
Func<Control> contentFactory,
|
||
|
|
int sortOrder = 0)
|
||
|
|
{
|
||
|
|
ArgumentException.ThrowIfNullOrWhiteSpace(id);
|
||
|
|
ArgumentException.ThrowIfNullOrWhiteSpace(title);
|
||
|
|
ArgumentNullException.ThrowIfNull(contentFactory);
|
||
|
|
|
||
|
|
Id = id.Trim();
|
||
|
|
Title = title.Trim();
|
||
|
|
ContentFactory = contentFactory;
|
||
|
|
SortOrder = sortOrder;
|
||
|
|
}
|
||
|
|
|
||
|
|
public string Id { get; }
|
||
|
|
|
||
|
|
public string Title { get; }
|
||
|
|
|
||
|
|
public int SortOrder { get; }
|
||
|
|
|
||
|
|
public Func<Control> ContentFactory { get; }
|
||
|
|
}
|