NAnt SDK Documentation - v0.85-nightly-2005-11-09

IfNotTask Class

[This is preliminary documentation and subject to change.]

NOTE: This class is now obsolete.

Use the <if> task instead.


The opposite of the if task.

For a list of all members of this type, see IfNotTask Members.

System.Object
   NAnt.Core.Element
      NAnt.Core.Task
         NAnt.Core.TaskContainer
            NAnt.Core.Tasks.IfTask
               NAnt.Core.Tasks.IfNotTask

[Visual Basic]
<TaskName(Name:="ifnot"), _  Obsolete(Message:="Use the <if> task instead.", IsError:=False)>
Public Class IfNotTask
    Inherits IfTask
[C#]
[TaskName(Name="ifnot")]
[Obsolete(Message="Use the <if> task instead.", IsError=False)]
public class IfNotTask : IfTask

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Missing <remarks> documentation for T:NAnt.Core.Tasks.IfNotTask

Example

Check that a property does not exist.

                
            <ifnot propertyexists="myProp">
                <echo message="myProp does not exist."/>
            </if>
                
              

Check that a property value is not true.

                
            <ifnot propertytrue="myProp">
                <echo message="myProp is not true."/>
            </if>
                
              

Check that a target does not exist.

                
            <ifnot targetexists="myTarget">
                <echo message="myTarget does not exist."/>
            </if>
                
              

Requirements

Namespace: NAnt.Core.Tasks

Assembly: NAnt.Core (in NAnt.Core.dll)

See Also

IfNotTask Members | NAnt.Core.Tasks Namespace