mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-01 17:47:24 +02:00
* string keys * obsoletions * Fix ValueTupleSerializer * Release notes * fix release note conflict * cleanup * Fix yaml validator & tests * cleanup release notes * a * enumerator allocations * Also sequence enumerator alloc
22 lines
682 B
C#
22 lines
682 B
C#
using System.Collections.Generic;
|
|
using Robust.Shared.Serialization.Markdown.Sequence;
|
|
using Robust.Shared.Serialization.Markdown.Value;
|
|
|
|
namespace Robust.Shared.Serialization.Markdown.Mapping
|
|
{
|
|
public static class MappingDataNodeExtensions
|
|
{
|
|
public static MappingDataNode Add(this MappingDataNode mapping, string key, string value)
|
|
{
|
|
mapping.Add(key, new ValueDataNode(value));
|
|
return mapping;
|
|
}
|
|
|
|
public static MappingDataNode Add(this MappingDataNode mapping, string key, List<string> sequence)
|
|
{
|
|
mapping.Add(key, new SequenceDataNode(sequence));
|
|
return mapping;
|
|
}
|
|
}
|
|
}
|