From 69dfdc9830324965aa5cc4f30d16a8cb60ff39f3 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 13 Oct 2022 20:31:42 -0500 Subject: use a record --- src/slskd/Shares/Types/Host.cs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/slskd/Shares/Types/Host.cs b/src/slskd/Shares/Types/Host.cs index db68c48e..3c5c9f9f 100644 --- a/src/slskd/Shares/Types/Host.cs +++ b/src/slskd/Shares/Types/Host.cs @@ -23,7 +23,7 @@ namespace slskd.Shares /// /// A share host. /// - public class Host + public record Host { /// /// Initializes a new instance of the class. @@ -49,28 +49,16 @@ namespace slskd.Shares /// /// Gets the collection of hosted shares. /// - public IEnumerable Shares { get; private set; } + public IEnumerable Shares { get; init; } /// /// Gets the host state. /// - public HostState State { get; private set; } + public HostState State { get; init; } /// /// Gets the host type. /// public HostType Type { get; } - - /// - /// Sets the hosted shares for the host. - /// - /// The collection of shares. - public void SetShares(IEnumerable shares) => Shares = shares; - - /// - /// Sets the state of the host. - /// - /// The new state. - public void SetState(HostState state) => State = state; } } \ No newline at end of file -- cgit v1.2.3