public void LoadFrom(YamlMappingNode mapping)
        {
            if (!mapping.TryGetNode("steps", out YamlSequenceNode steps))
            {
                return;
            }

            foreach (var node in steps)
            {
                var sequence = (YamlSequenceNode)node;
                var list     = new List <ConstructionGraphStep>();

                foreach (var innerNode in sequence)
                {
                    var stepNode = (YamlMappingNode)innerNode;
                    var step     = ConstructionGraphEdge.LoadStep(stepNode);

                    if (step is NestedConstructionGraphStep)
                    {
                        throw new InvalidDataException("Can't have nested construction steps inside nested construction steps!");
                    }

                    list.Add(step);
                }

                Steps.Add(list);
            }
        }
        public void LoadFrom(YamlMappingNode mapping)
        {
            var serializer = YamlObjectSerializer.NewReader(mapping);

            ExposeData(serializer);

            if (!mapping.TryGetNode("edges", out YamlSequenceNode edgesMapping))
            {
                return;
            }

            foreach (var yamlNode in edgesMapping)
            {
                var edgeMapping = (YamlMappingNode)yamlNode;
                var edge        = new ConstructionGraphEdge();
                edge.LoadFrom(edgeMapping);
                _edges.Add(edge);
            }
        }