Пример #1
0
 public LuaCopyTask(ITaskBuilder taskBuilder, string source, string target)
 {
     _taskBuilder = taskBuilder;
     _taskBuilder
     .With("CopyFromPath", source)
     .With("CopyToPath", target);
 }
        public LuaCreateSteamWorkshopItemTask(ITaskBuilder taskBuilder, LuaTable table)
        {
            taskBuilder
            .With("AppId", Convert.ToUInt32(table["app_id"]))
            .With("Title", table["title"])
            .With("DescriptionFilePath", table["description_file"])
            .With("ItemFolderPath", table["item_folder"])
            .With("Visibility", table["visibility"])
            .With("Language", table["language"]);

            LuaTable         tags       = (LuaTable)table["tags"];
            HashSet <string> stringTags = tags?.Values.Cast <string>().ToHashSet();

            if (stringTags != null)
            {
                taskBuilder.With("Tags", stringTags);
            }

            Task = taskBuilder.Build();
        }
Пример #3
0
        private ITask MakeTask(object buildConfigTask)
        {
            ITaskBuilder taskBuilder = _factory.Task(buildConfigTask.GetType().Name);

            foreach (PropertyInfo prop in buildConfigTask.GetType().GetProperties())
            {
                taskBuilder.With(prop.Name, prop.GetValue(buildConfigTask));
            }

            ITask task = taskBuilder.Build();

            return(task);
        }
Пример #4
0
 public LuaRunProcessTask(ITaskBuilder taskBuilder, string path)
 {
     _taskBuilder = taskBuilder;
     _taskBuilder.With("ExecutablePath", path);
 }
Пример #5
0
 public LuaRunProcessTask arguments(string args)
 {
     _taskBuilder.With("Arguments", args);
     return(this);
 }
Пример #6
0
 public LuaCleanTask(ITaskBuilder taskBuilder, string path)
 {
     _taskBuilder = taskBuilder;
     _taskBuilder.With("Path", path);
 }
Пример #7
0
 public LuaCopyTask overwrite(bool overwrite)
 {
     _taskBuilder.With("AlwaysOverwrite", overwrite);
     return(this);
 }