コード例 #1
0
        public static AtlasJobEnvrionment SubmitPatternCommand(this AtlasJobEnvrionment e, string commandLine, string pattern)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            return(e.Clone(r => r.Job = r.Job.SubmitCommandPattern(commandLine, pattern)));
        }
コード例 #2
0
        public static AtlasJobEnvrionment Command(this AtlasJobEnvrionment e, string commandLine)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            return(e.Clone(r => r.Job = r.Job.Command(commandLine)));
        }
コード例 #3
0
        public static AtlasJobEnvrionment Package(this AtlasJobEnvrionment e, string packageName, string SCTag = "")
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            return(e.Clone(r => r.Job = r.Job.Package(packageName, SCTag)));
        }
コード例 #4
0
        public static AtlasJobEnvrionment NameVersionRelease(this AtlasJobEnvrionment e, string name, int version, string release)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            return(e.Clone(r => r.Job = r.Job.NameVersionRelease(name, version, release)));
        }
コード例 #5
0
        /// <summary>
        /// Make a deep clone
        /// </summary>
        /// <returns></returns>
        public AtlasJobEnvrionment Clone(Action<AtlasJobEnvrionment> modifyIt = null)
        {
            // do a deep copy
            var result = new AtlasJobEnvrionment();
            result.Job = this.Job?.Clone();

            // If asked, then we can modify this before it comes back (and avoid
            // the normal deep copy).
            if (modifyIt != null)
                modifyIt(result);
            return result;
        }
コード例 #6
0
        /// <summary>
        /// Make a deep clone
        /// </summary>
        /// <returns></returns>
        public AtlasJobEnvrionment Clone(Action <AtlasJobEnvrionment> modifyIt = null)
        {
            // do a deep copy
            var result = new AtlasJobEnvrionment();

            result.Job = this.Job?.Clone();

            // If asked, then we can modify this before it comes back (and avoid
            // the normal deep copy).
            if (modifyIt != null)
            {
                modifyIt(result);
            }
            return(result);
        }