当前位置: 首页>>代码示例>>C#>>正文


C# Context.SubstituteWildCards方法代码示例

本文整理汇总了C#中Context.SubstituteWildCards方法的典型用法代码示例。如果您正苦于以下问题:C# Context.SubstituteWildCards方法的具体用法?C# Context.SubstituteWildCards怎么用?C# Context.SubstituteWildCards使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Context的用法示例。


在下文中一共展示了Context.SubstituteWildCards方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Validate

        public override void Validate(Context context)
        {
            if (string.IsNullOrEmpty(_destinationPath))
            {
                throw new ArgumentNullException("DestinationPath is either null or of zero length");
            }
            _destinationPath = context.SubstituteWildCards(_destinationPath);

            if (string.IsNullOrEmpty(_sourcePath))
            {
                throw new ArgumentNullException("SourcePath is either null or of zero length");
            }
            _sourcePath = context.SubstituteWildCards(_sourcePath);
        }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:14,代码来源:MoveStep.cs

示例2: Validate

        ///<summary>
        /// Validates the SqlQuery
        ///</summary>
        /// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
        ///<exception cref="ArgumentNullException"></exception>
        public void Validate(Context context)
        {
            string sqlQuery = GetFormattedSqlQuery(context);
            if (string.IsNullOrEmpty(sqlQuery))
            {
                throw new ArgumentNullException("The Sql Query cannot be formmatted correctly");
            }

            for (int c = 0; c < QueryParameters.Count; c++)
            {
                if (QueryParameters[c] is string)
                {
                    QueryParameters[c] = context.SubstituteWildCards((string)QueryParameters[c]);
                }
            }

            RawSqlQuery = context.SubstituteWildCards(RawSqlQuery);
        }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:23,代码来源:SqlQuery.cs

示例3: Validate

        public override void Validate(Context context)
        {
            if (string.IsNullOrEmpty(CreationPath))
            {
                throw new ArgumentNullException("CreationPath is either null or of zero length");
            }
            CreationPath = context.SubstituteWildCards(CreationPath);

            DataSource.Validate(context);
        }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:10,代码来源:CreateStep.cs

示例4: Validate

        public void Validate(Context context)
        {
            // xPathValidations - optional

            if (string.IsNullOrEmpty(_xmlSchemaPath))
            {
                throw new ArgumentNullException("XmlSchemaPath is either null or of zero length");
            }
            _xmlSchemaPath = context.SubstituteWildCards(_xmlSchemaPath);

            if (string.IsNullOrEmpty(_xmlSchemaNameSpace))
            {
                throw new ArgumentNullException("XmlSchemaNameSpace is either null or of zero length");
            }
            _xmlSchemaNameSpace = context.SubstituteWildCards(_xmlSchemaNameSpace);
        }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:16,代码来源:XmlValidationStep.cs

示例5: Validate

        /// <summary>
        /// ITestStep.Validate() implementation
        /// </summary>
        public void Validate(Context context)
	    {
            if (string.IsNullOrEmpty(_processName))
            {
                throw new ArgumentNullException("ProcessName is either null or of zero length");
            }
            _processName = context.SubstituteWildCards(_processName);

            if (string.IsNullOrEmpty(_processParams))
            {
                throw new ArgumentNullException("ProcessParams is either null or of zero length");
            }
            _processParams = context.SubstituteWildCards(_processParams);

            if (string.IsNullOrEmpty(_workingDirectory))
            {
                throw new ArgumentNullException("WorkingDirectory is either null or of zero length");
            }
            _workingDirectory = context.SubstituteWildCards(_workingDirectory);
        }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:23,代码来源:ExecuteCommandStep.cs

示例6: Validate

        public void Validate(Context context)
	    {
            // delayBeforeCheck - optional

            if (string.IsNullOrEmpty(_connectionString))
            {
                throw new ArgumentNullException("ConnectionString is either null or of zero length");
            }
            _connectionString = context.SubstituteWildCards(_connectionString);

            if (null == _sqlQuery)
            {
                throw new ArgumentNullException("ConnectionString is either null or of zero length");
            }

            _sqlQuery.Validate(context);
        }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:17,代码来源:DBQueryStep.cs

示例7: Validate

        ///<summary>
        /// TestStepBase.Validate() implementation
        ///</summary>
        /// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
        ///<exception cref="ArgumentNullException"></exception>
        public override void Validate(Context context)
        {
            if (null == _filesToDelete || 0 == _filesToDelete.Count)
            {
                throw new ArgumentNullException("FilePathsToDelete is either null or of zero length");
            }

            for (int c = 0; c < _filesToDelete.Count; c++)
            {
                _filesToDelete[c] = context.SubstituteWildCards(_filesToDelete[c]);
            }
        }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:17,代码来源:Delete.cs

示例8: Validate

	    public void Validate(Context context)
	    {
            // compareAsUTF8 - optional

            if (string.IsNullOrEmpty(_comparisonDataPath))
            {
                throw new ArgumentNullException("ComparisonDataPath is either null or of zero length");
            }

            _comparisonDataPath = context.SubstituteWildCards(_comparisonDataPath);
	    }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:11,代码来源:BinaryValidationStep.cs

示例9: Validate

        /// <summary>
        /// TestStepBase.Validate() implementation
        /// </summary>
        /// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
        public override void Validate(Context context)
        {
            ArgumentValidation.CheckForEmptyString(_pipelineTypeName, "pipelineTypeName");
            // pipelineAssemblyPath - optional

            _source = context.SubstituteWildCards(_source);
            if (!new FileInfo(_source).Exists)
            {
                throw new ArgumentException("Source file does not exist.", _source);
            }

            // destinationDir - optional
            if (!string.IsNullOrEmpty(_destinationDir))
            {
                _destinationDir = context.SubstituteWildCards(_destinationDir);
            }
        }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:21,代码来源:ExecuteReceivePipelineStep.cs

示例10: Validate

        /// <summary>
        /// ITestStepOM.Validate() implementation
        /// </summary>
        /// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
        public void Validate(Context context)
	    {
            if (0 > _timeout)
            {
                throw new ArgumentNullException("Timeout must be greater than zero");
            }

            if (string.IsNullOrEmpty(_directory))
            {
                throw new ArgumentNullException("Directory is either null or of zero length");
            }
            _directory = context.SubstituteWildCards(_directory);

            if (string.IsNullOrEmpty(_searchPattern))
            {
                throw new ArgumentNullException("SearchPattern is either null or of zero length");
            }
            _searchPattern = context.SubstituteWildCards(_searchPattern);

            if(null != _validationStep)
            {
                _validationStep.Validate(context);
            }

            if(null != _contextLoaderStep)
            {
                _contextLoaderStep.Validate(context);
            }
	    }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:33,代码来源:FileValidateStep.cs

示例11: Validate

        public void Validate(Context context)
	    {
            // delayBeforeExecution - optional

	    	if(string.IsNullOrEmpty(_connectionString))
	        {
                throw new ArgumentNullException("ConnectionString is either null or of zero length");
	        }
            _connectionString = context.SubstituteWildCards(_connectionString);

            // numberOfRowsAffected - no validation

	    	if(null == _sqlQuery)
	        {
                throw new ArgumentNullException("ConnectionString is either null or of zero length");
	        }
            else
	    	{
	    	    _sqlQuery.Validate(context);
	    	}
	    }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:21,代码来源:DBExecuteNonQueryStep.cs

示例12: Validate

        /// <summary>
        /// TestStepBase.Validate() implementation
        /// </summary>
        /// <param name='context'>The context for the test, this holds state that is passed beteen tests</param>
        public override void Validate(Context context)
        {
            ArgumentValidation.CheckForEmptyString(_pipelineTypeName, "pipelineTypeName");
            // pipelineAssemblyPath - optional

            _destination = context.SubstituteWildCards(_destination);
        }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:11,代码来源:ExecuteSendPipelineStep.cs

示例13: Validate

        public void Validate(Context context)
	    {
            if (String.IsNullOrEmpty(_directory))
            {
                throw new ArgumentNullException("CreationPath is either null or of zero length");
            }
            _directory = context.SubstituteWildCards(_directory);

            if (String.IsNullOrEmpty(_searchPattern))
            {
                throw new ArgumentNullException("SourcePath is either null or of zero length");
            }
            _searchPattern = context.SubstituteWildCards(_searchPattern);
        }
开发者ID:RobBowman,项目名称:BizUnit,代码行数:14,代码来源:FileDeleteMultipleStep.cs


注:本文中的Context.SubstituteWildCards方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。