Target Target Target Target Class

定义

表示 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
继承
TargetTargetTargetTarget
实现

属性

Condition Condition Condition Condition

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

DependsOnTargets DependsOnTargets DependsOnTargets DependsOnTargets

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

Inputs Inputs Inputs Inputs

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

IsImported IsImported IsImported IsImported

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

Name Name Name Name

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

Outputs Outputs Outputs Outputs

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

方法

AddNewTask(String) AddNewTask(String) AddNewTask(String) AddNewTask(String)

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

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

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

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
RemoveTask(BuildTask) RemoveTask(BuildTask) RemoveTask(BuildTask) RemoveTask(BuildTask)

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

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

扩展方法

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

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

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于