Project.MarkDirty 方法


将此项目标记为已修改。Marks this project as modified.

 void MarkDirty();
public void MarkDirty ();
member this.MarkDirty : unit -> unit
Public Sub MarkDirty ()


很少需要显式调用此方法,因为影响项目的所有编辑会自动将其标记为已修改。It is seldom necessary to call this method explicitly, because all edits affecting a project automatically mark it as modified.

但有时,必须调用此方法。Sometimes, however, this method must be called. 例如,项目可能有一个导入元素,其条件依赖于磁盘上存在的文件。For example, a project may have an Import element whose condition depends on a file that exists on a disk. 如果该文件不存在于计算时,并且在计算后创建,则该项目必须显式标记为已修改。If that file does not exist at evaluation time, and it is created after evaluation, then the project must be explicitly marked as modified.

@No__t-0 方法使用此属性来确定是否需要进行评估。The ReevaluateIfNecessary method uses this property to determine if an evaluation is necessary.