// ReSharper disable CheckNamespace -- matches Stardew Valley's code namespace Netcode { /// A simplified version of Stardew Valley's Netcode.NetFieldBase for unit testing. /// The type of the synchronized value. /// The type of the current instance. public class NetFieldBase where TSelf : NetFieldBase { /// The synchronised value. public T? Value { get; set; } /// Implicitly convert a net field to the its type. /// The field to convert. public static implicit operator T?(NetFieldBase field) { return field.Value; } } }