[Test] // ExSkip public void WorkWithNot() { var project = new Project(DataDir + "Project2.mpp"); // gather all project tasks var coll = new ChildTasksCollector(); TaskUtils.Apply(project.RootTask, coll, 0); // create a filter condition var filter = new NullCondition(); // and reverse it by applying <see cref="Aspose.Tasks.Util.Not`1" /> condition var condition = new Not <Task>(filter); // apply the condition to the collected tasks List <Task> collection = Filter(coll.Tasks, condition); foreach (var task in collection) { Console.WriteLine("Name: " + task.Get(Tsk.Name)); // work with other properties... } // ... }
public void Test___Method_Check___Value_not_null() { var testee = new NullCondition() { Value = new AnyVariable <int>() { Value = 10 } }; Assert.IsFalse(testee.Check()); }
public void Test___Method_Check___Value_null() { var testee = new NullCondition() { Value = new AnyVariable() { Value = null } }; Assert.IsTrue(testee.Check()); }
protected virtual string CompileNullCondition(SqlResult ctx, NullCondition item) { var op = item.IsNot ? "IS NOT NULL" : "IS NULL"; return(Wrap(item.Column) + " " + op); }
protected override void initializeStepCondition() { stepCondition_ = new NullCondition<Vector>(); }
protected void initializeStepConditionImpl() { stepCondition_ = new NullCondition<Vector>(); }
public IsNullFilter(string name, NullCondition nullCondition) { this.Name = name; this._nullCondition = nullCondition; }
public BaseCondition(IQueryField Field, NullCondition Condition) { this.Field = Field; queryPart = string.Format("{0} is {1}null", Field.GetQueryPart(), Condition == NullCondition.IsNull ? "" : "not "); }
protected virtual string CompileNullCondition(SqlResult context, NullCondition item) { string op = item.IsNot ? "IS NOT NULL" : "IS NULL"; return(wrapper.Wrap(item.Column) + " " + op); }