99 references to HasUnsavedChanges
Microsoft.Build (3)
Construction\ProjectRootElement.cs (2)
1527
if (
HasUnsavedChanges
|| !Equals(saveEncoding, Encoding))
2134
if (
HasUnsavedChanges
&& throwIfUnsavedChanges)
ObjectModelRemoting\ConstructionObjectLinks\ProjectRootElementLink.cs (1)
26
/// Access to remote <see cref="ProjectRootElement.
HasUnsavedChanges
"/>.
Microsoft.Build.Engine.OM.UnitTests (95)
Construction\ConstructionEditing_Tests.cs (11)
39
Assert.True(project.
HasUnsavedChanges
);
58
Assert.False(project.
HasUnsavedChanges
);
380
Assert.True(project.
HasUnsavedChanges
);
422
Assert.True(project.
HasUnsavedChanges
);
554
Assert.True(project.
HasUnsavedChanges
);
575
Assert.True(project.
HasUnsavedChanges
);
620
Assert.True(project.
HasUnsavedChanges
);
1181
Assert.True(project.
HasUnsavedChanges
);
1345
Assert.True(project.
HasUnsavedChanges
);
1369
Assert.True(project.
HasUnsavedChanges
);
1426
Assert.True(project.
HasUnsavedChanges
);
Construction\ProjectExtensionsElement_Tests.cs (1)
89
Assert.True(extensions.ContainingProject.
HasUnsavedChanges
);
Construction\ProjectImportGroupElement_Tests.cs (3)
337
Assert.True(project.
HasUnsavedChanges
);
379
Assert.True(project.
HasUnsavedChanges
);
396
Assert.True(project.
HasUnsavedChanges
);
Construction\ProjectItemDefinitionElement_Tests.cs (1)
213
Assert.True(project.
HasUnsavedChanges
);
Construction\ProjectItemDefinitionGroupElement_Tests.cs (2)
109
Assert.True(project.
HasUnsavedChanges
);
126
Assert.True(project.
HasUnsavedChanges
);
Construction\ProjectItemElement_Tests.cs (4)
1011
Assert.False(project.
HasUnsavedChanges
);
1016
Assert.True(project.
HasUnsavedChanges
);
1031
Assert.False(project.
HasUnsavedChanges
);
1036
Assert.True(project.
HasUnsavedChanges
);
Construction\ProjectItemGroupElement_tests.cs (2)
89
Assert.True(project.
HasUnsavedChanges
);
106
Assert.True(project.
HasUnsavedChanges
);
Construction\ProjectMetadataElement_Tests.cs (2)
224
Assert.True(metadatum.ContainingProject.
HasUnsavedChanges
);
238
Assert.False(metadatum.ContainingProject.
HasUnsavedChanges
);
Construction\ProjectOnErrorElement_Tests.cs (2)
267
Assert.True(project.
HasUnsavedChanges
);
285
Assert.True(project.
HasUnsavedChanges
);
Construction\ProjectOutputElement_Tests.cs (3)
217
Assert.True(output.ContainingProject.
HasUnsavedChanges
);
231
Assert.True(output.ContainingProject.
HasUnsavedChanges
);
258
Assert.True(output.ContainingProject.
HasUnsavedChanges
);
Construction\ProjectPropertyElement_Tests.cs (6)
164
Assert.True(property.ContainingProject.
HasUnsavedChanges
);
180
Assert.False(property.ContainingProject.
HasUnsavedChanges
);
193
Assert.True(property.ContainingProject.
HasUnsavedChanges
);
207
Assert.False(property.ContainingProject.
HasUnsavedChanges
);
234
Assert.True(property.ContainingProject.
HasUnsavedChanges
);
262
Assert.True(property.ContainingProject.
HasUnsavedChanges
);
Construction\ProjectPropertyGroupElement_Tests.cs (2)
87
Assert.True(project.
HasUnsavedChanges
);
104
Assert.True(project.
HasUnsavedChanges
);
Construction\ProjectRootElement_Tests.cs (5)
112
Assert.True(project.
HasUnsavedChanges
); // it is indeed unsaved
125
Assert.True(project.
HasUnsavedChanges
);
138
Assert.True(project.
HasUnsavedChanges
);
151
Assert.True(project.
HasUnsavedChanges
);
1867
Assert.True(projectElement.
HasUnsavedChanges
);
Construction\ProjectTargetElement_Tests.cs (10)
64
Assert.True(project.
HasUnsavedChanges
);
226
Assert.True(project.
HasUnsavedChanges
);
242
Assert.True(project.
HasUnsavedChanges
);
258
Assert.True(project.
HasUnsavedChanges
);
274
Assert.True(project.
HasUnsavedChanges
);
290
Assert.True(project.
HasUnsavedChanges
);
306
Assert.True(project.
HasUnsavedChanges
);
323
Assert.True(project.
HasUnsavedChanges
);
330
Assert.True(project.
HasUnsavedChanges
);
337
Assert.True(project.
HasUnsavedChanges
);
Construction\ProjectTaskElement_Tests.cs (5)
163
Assert.True(task.ContainingProject.
HasUnsavedChanges
);
231
Assert.True(task.ContainingProject.
HasUnsavedChanges
);
247
Assert.True(task.ContainingProject.
HasUnsavedChanges
);
279
Assert.True(project.
HasUnsavedChanges
);
294
Assert.True(project.
HasUnsavedChanges
);
Construction\ProjectUsingTaskElement_Tests.cs (5)
254
Assert.True(usingTask.ContainingProject.
HasUnsavedChanges
);
268
Assert.True(usingTask.ContainingProject.
HasUnsavedChanges
);
309
Assert.True(usingTask.ContainingProject.
HasUnsavedChanges
);
324
Assert.True(usingTask.ContainingProject.
HasUnsavedChanges
);
339
Assert.True(usingTask.ContainingProject.
HasUnsavedChanges
);
Construction\UsingTaskBodyElement_Tests.cs (2)
82
Assert.True(body.ContainingProject.
HasUnsavedChanges
);
96
Assert.True(body.ContainingProject.
HasUnsavedChanges
);
Construction\UsingTaskParameterElement_Tests.cs (9)
107
Assert.True(parameter.ContainingProject.
HasUnsavedChanges
);
121
Assert.True(parameter.ContainingProject.
HasUnsavedChanges
);
135
Assert.True(parameter.ContainingProject.
HasUnsavedChanges
);
149
Assert.True(parameter.ContainingProject.
HasUnsavedChanges
);
163
Assert.True(parameter.ContainingProject.
HasUnsavedChanges
);
177
Assert.True(parameter.ContainingProject.
HasUnsavedChanges
);
191
Assert.True(parameter.ContainingProject.
HasUnsavedChanges
);
205
Assert.True(parameter.ContainingProject.
HasUnsavedChanges
);
219
Assert.True(parameter.ContainingProject.
HasUnsavedChanges
);
Definition\Project_Tests.cs (7)
1458
import.
HasUnsavedChanges
.ShouldBeFalse();
1523
import.
HasUnsavedChanges
.ShouldBeFalse();
1534
import.
HasUnsavedChanges
.ShouldBeTrue();
1607
projectRootElement.
HasUnsavedChanges
.ShouldBeFalse();
1616
projectRootElement.
HasUnsavedChanges
.ShouldBeTrue();
2185
project.Xml.
HasUnsavedChanges
.ShouldBeTrue(); // Not dirty for saving
2202
project.Xml.
HasUnsavedChanges
.ShouldBeFalse(); // Not dirty for saving
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (2)
533
Assert.Equal(realXml.
HasUnsavedChanges
, viewXml.
HasUnsavedChanges
);
ObjectModelRemoting\LinkedSpecialCasesScenarios.cs (10)
97
Assert.True(xmlPair.View.
HasUnsavedChanges
);
99
Assert.False(xmlPair.View.
HasUnsavedChanges
);
111
Assert.False(sourceProject.
HasUnsavedChanges
);
127
Assert.True(xmlPair.View.
HasUnsavedChanges
);
128
Assert.True(xmlPair.Real.
HasUnsavedChanges
);
151
Assert.True(xmlPair.View.
HasUnsavedChanges
);
153
Assert.False(xmlPair.View.
HasUnsavedChanges
);
180
Assert.True(xmlPair.View.
HasUnsavedChanges
);
181
Assert.False(externalSource && sourceProject.
HasUnsavedChanges
);
200
Assert.False(externalSource && sourceProject.
HasUnsavedChanges
);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectRootElementLink.cs (1)
33
public bool HasUnsavedChanges => this.ProjectXml.
HasUnsavedChanges
;
Microsoft.Build.UnitTests.Shared (1)
ObjectModelHelpers.cs (1)
1988
Assert.False(project.
HasUnsavedChanges
);