Enable nullability in Content.Server (#3685)
This commit is contained in:
@@ -5,9 +5,9 @@ namespace Content.Server.GameObjects.EntitySystems.DeviceNetwork
|
||||
{
|
||||
public class Metadata : Dictionary<string, object>
|
||||
{
|
||||
public bool TryParseMetadata<T>(string key, [NotNullWhen(true)] out T data)
|
||||
public bool TryParseMetadata<T>(string key, [NotNullWhen(true)] out T? data)
|
||||
{
|
||||
if(TryGetValue(key, out var value) && value is T typedValue)
|
||||
if (TryGetValue(key, out var value) && value is T typedValue)
|
||||
{
|
||||
data = typedValue;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user