using System.Diagnostics.CodeAnalysis;
namespace StardewModdingAPI.Framework.Networking
{
internal class MultiplayerPeerMod : IMultiplayerPeerMod
{
/*********
** Accessors
*********/
///
public string Name { get; }
///
public string ID { get; }
///
public ISemanticVersion Version { get; }
/*********
** Public methods
*********/
/// Construct an instance.
/// The mod metadata.
[SuppressMessage("ReSharper", "ConditionalAccessQualifierIsNonNullableAccordingToAPIContract", Justification = "The ID shouldn't be null, but we should handle it to avoid an error just in case.")]
public MultiplayerPeerMod(RemoteContextModModel mod)
{
this.Name = mod.Name;
this.ID = mod.ID?.Trim() ?? string.Empty;
this.Version = mod.Version;
}
}
}