Пример #1
0
        public ITaskAction When(Func <IScriptParams, bool> condition)
        {
            var config = new TaskConditionalConfiguration(this, condition);

            _configurations.Add(config);
            return(config);
        }
Пример #2
0
        void FillAttributeDependencies()
        {
            var attrib = Type.GetCustomAttribute <DependsAttribute>();

            if (attrib == null)
            {
                return;
            }
            var asm = Type.Assembly;

            foreach (var typeName in attrib.TaskNames)
            {
                var type   = asm.GetType(Type.GetNestedNameFor(typeName));
                var config = new TaskConditionalConfiguration(this);
                config.AddDependency(type);
                _configurations.Add(config);
            }
        }