Ejemplo n.º 1
0
        public static YAMLNode ExportYAML(this IEnumerable <short> _this)
        {
#warning TODO: check
            YAMLSequenceNode node = new YAMLSequenceNode(SequenceStyle.Block);
            foreach (short value in _this)
            {
                node.Add(value);
            }
            return(node);
        }
Ejemplo n.º 2
0
        public static YAMLNode ExportYAML(this IEnumerable <string> _this)
        {
            YAMLSequenceNode node = new YAMLSequenceNode(SequenceStyle.Block);

            foreach (string value in _this)
            {
                node.Add(value);
            }
            return(node);
        }
Ejemplo n.º 3
0
        public static YAMLNode ExportYAML(this IReadOnlyDictionary <string, float> _this)
        {
            YAMLSequenceNode node = new YAMLSequenceNode(SequenceStyle.Block);

            foreach (var kvp in _this)
            {
                YAMLMappingNode map = new YAMLMappingNode();
                map.Add(kvp.Key, kvp.Value);
                node.Add(map);
            }
            return(node);
        }
Ejemplo n.º 4
0
        public static YAMLNode ExportYAML(this IReadOnlyDictionary <uint, string> _this)
        {
#warning TODO: check
            YAMLSequenceNode node = new YAMLSequenceNode(SequenceStyle.Block);
            foreach (var kvp in _this)
            {
                YAMLMappingNode map = new YAMLMappingNode();
                map.Add(kvp.Key.ToString(), kvp.Value);
                node.Add(map);
            }
            return(node);
        }
Ejemplo n.º 5
0
 public static YAMLNode ExportYAML(this IEnumerable <int> _this, bool isRaw)
 {
     if (isRaw)
     {
         foreach (int value in _this)
         {
             s_sb.Append(value.ToHexString());
         }
         YAMLScalarNode node = new YAMLScalarNode(s_sb.ToString());
         s_sb.Length = 0;
         return(node);
     }
     else
     {
         YAMLSequenceNode node = new YAMLSequenceNode(SequenceStyle.Block);
         foreach (int value in _this)
         {
             node.Add(value);
         }
         return(node);
     }
 }