Exemplo n.º 1
0
        public static string GetUserStoryYaml(UserStory userStory)
        {
            var yamlProperties  = userStory.ToYamlProperties();
            var utcIsoConverter = new DateTimeConverter(kind: DateTimeKind.Utc, formats: UtcIsoFormatString);
            var serializer      = new SerializerBuilder()
                                  .WithTypeConverter(utcIsoConverter)
                                  .Build();

            string yaml  = serializer.Serialize(yamlProperties);
            string final = $"{YamlStartToken}{yaml.Trim() + Environment.NewLine}{YamlEndToken}{Environment.NewLine}";

            return(final.NormalizeYamlLineEndings());
        }