Пример #1
0
        public GenerationContext File(Action <FileBuilder> action)
        {
            var file = FileBuilder.Create();

            Files.Add(file);
            action(file);
            return(this);
        }
Пример #2
0
        public GenerationContext FileIfPathIsSet(Action <FileBuilder> action)
        {
            var file = FileBuilder.Create();

            action(file);
            if (file.HasPathConfigured())
            {
                Files.Add(file);
            }
            return(this);
        }
Пример #3
0
        public GenerationContext SingleFile(Action <FileBuilder> action)
        {
            if (Files.Any())
            {
                action(Files.First());
                return(this);
            }

            var file = FileBuilder.Create();

            Files.Add(file);
            action(file);
            return(this);
        }