ProjectProperty 类

定义

计算的设计时属性An evaluated design-time property

public ref class ProjectProperty abstract : IEquatable<Microsoft::Build::Evaluation::ProjectProperty ^>
public ref class ProjectProperty : IEquatable<Microsoft::Build::Evaluation::ProjectProperty ^>
public abstract class ProjectProperty : IEquatable<Microsoft.Build.Evaluation.ProjectProperty>
public class ProjectProperty : IEquatable<Microsoft.Build.Evaluation.ProjectProperty>
type ProjectProperty = class
    interface IEquatable<ProjectProperty>
Public MustInherit Class ProjectProperty
Implements IEquatable(Of ProjectProperty)
Public Class ProjectProperty
Implements IEquatable(Of ProjectProperty)
继承
ProjectProperty
实现

属性

EvaluatedValue

获取计算的属性值。Gets the evaluated property value. 不能直接设置:只能设置未计算的值。Cannot be set directly: only the unevaluated value can be set. 决不会为 null。Is never null.

IsEnvironmentProperty

该属性是否源自于环境(或工具集)Whether the property originated from the environment (or the toolset)

IsGlobalProperty

该属性是否为全局属性Whether the property is a global property

IsImported

如果属性源自一个导入的文件,则返回 true。If the property originated in an imported file, returns true. 如果属性源自环境、全局属性或为内置属性,则返回 false。If the property originates from the environment, a global property, or is a built-in property, returns false. 否则,返回 False。Otherwise returns false.

IsReservedProperty

该属性是否为保留属性(如“MSBuildProjectFile”)。Whether the property is a reserved property, like 'MSBuildProjectFile'.

Name

属性的名称。Name of the property. 无法设置。Cannot be set.

Predecessor

在计算期间由此属性重写的前面最近的一个属性。Any immediately previous property that was overridden by this one during evaluation. 这将包括在逻辑项目文件上具有相同名称的所有属性,其条件计算结果为 true。This would include all properties with the same name that lie above in the logical project file, and whose conditions evaluated to true. 如果上面没有任何值,则为 null。If there are none above this is null. 如果自上次修改后未重新计算项目,则此值可能不正确。If the project has not been reevaluated since the last modification this value may be incorrect.

Project

此属性所在的项目。Project that this property lives in. ProjectProperty 始终位于项目中。ProjectProperty's always live in a project.

UnevaluatedValue

获取或设置未计算的属性值。Gets or sets the unevaluated property value. 更新项目中的计算值,尽管在重新计算之前,此值不一定是正确的。Updates the evaluated value in the project, although this is not sure to be correct until re-evaluation.

Xml

支持 XML 属性。Backing XML property. 只有在此属性为全局属性、环境属性或内置属性时,才为 null。Null only if this is a global, environment, or built-in property.

方法

Equals(Object)

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

(继承自 Object)
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)
ToString()

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

(继承自 Object)

显式接口实现

IEquatable<ProjectProperty>.Equals(ProjectProperty)

将此属性与另一个属性进行比较,确定是否相等。Compares this property to another for equivalence.

适用于