Target 类

定义

表示 MSBuild 项目中的单个 Target 元素。Represents a single Target element in an MSBuild project.

public ref class Target : System::Collections::IEnumerable
public class Target : System.Collections.IEnumerable
type Target = class
    interface IEnumerable
Public Class Target
Implements IEnumerable
继承
Target
实现

属性

Condition

获取 Target 元素的 Condition 特性值。Gets the Condition attribute value of the Target element.

DependsOnTargets

获取 Target 元素的 DependsOnTargets 属性值,其是以分号分隔的列表。Gets the DependsOnTargets attribute value of the Target element, which is a semicolon-separated list.

Inputs

获取或设置要输入到此目标中的项。Gets or sets the items that are to be input into this target.

IsImported

获取一个值,该值指示 Target 元素是否已导入到项目中。Gets a value indicating whether the Target element was imported into the project.

Name

获取 Target 元素的 Name 属性值。Gets the Name attribute value of the Target element.

Outputs

获取或设置此目标的期望输出。Gets or sets the expected outputs of this target.

方法

AddNewTask(String)

将指定的 Task 元素添加到 Target 元素。Adds the specified Task element to the Target element.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetEnumerator()

获取循环访问 BuildTask 中的 Target 对象的枚举数。Gets an enumerator that iterates through the BuildTask objects in the Target.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
RemoveTask(BuildTask)

Target 元素中删除指定的 Task 元素。Removes the specified Task element from the Target element.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于