Esempio n. 1
0
 public void Write(SliceSection section, StringBuilder sb)
 {
     if (section.SectionType == SliceSection.Type.RUN)
     {
         foreach (var line in section.Lines)
         {
             sb.AppendLine(line);
         }
     }
 }
Esempio n. 2
0
        public void Write(SliceSection section, StringBuilder sb)
        {
            if (section.SectionType != SliceSection.Type.RUN)
            {
                foreach (var line in section.Lines.Where(item => !item.StartsWith("#")))
                {
                    sb.Append(section.SectionType).Append(" ").AppendLine(line);
                }
            }

            if (section.SectionType == SliceSection.Type.RUN)
            {
                var text = string.Join($" && {"\\"} {Environment.NewLine}", section.Lines.Where(item => !item.StartsWith("#")));
                sb.Append("RUN ");
                sb.AppendLine(text);
            }
        }
Esempio n. 3
0
        public void Write(SliceSection section, StringBuilder sb)
        {
            if (section.SectionType == SliceSection.Type.FROM)
            {
                foreach (var line in section.Lines)
                {
                    sb.Append("FROM ").AppendLine(line);
                }
            }

            if (section.SectionType == SliceSection.Type.RUN)
            {
                var text = string.Join($" && {"\\"} {Environment.NewLine}", section.Lines);
                sb.Append("RUN ");
                sb.AppendLine(text);
            }
        }