/// <summary> /// Sets up a partial match / content rule. /// </summary> /// <param name="content">The content to match. Can be null. </param> /// <returns></returns> public SimulationCondition Contains(string content, ComparisonType comparison) { if ((comparison & ComparisonType.NotExists) != 0) throw new System.InvalidOperationException("You must use NotContains instead of NotExists for Contains checking. "); ContentRule rule = new ContentRule(content, comparison); SimulationConditionContent.ContainsStorage.Add(rule); return this; }
/// <summary> /// Sets up a partial match / content rule. /// </summary> /// <param name="content">The content to match. Can be null. </param> /// <param name="caseSensitive">If true, performs a case sensitive match. </param> /// <returns></returns> public SimulationCondition Contains(string content, bool caseSensitive) { ContentRule rule = new ContentRule(content, caseSensitive); SimulationConditionContent.ContainsStorage.Add(rule); return this; }
/// <summary> /// Sets up a partial match / content rule. /// </summary> /// <param name="content">The content to match. Can be null. </param> /// <returns></returns> public SimulationCondition Contains(string content) { ContentRule rule = new ContentRule(content); SimulationConditionContent.ContainsStorage.Add(rule); return this; }