5 writes to Count
Microsoft.Build (5)
Construction\ProjectElementContainer.cs (5)
182
Count
++;
238
Count
++;
329
Count
--;
405
Count
++;
664
Count
++;
53 references to Count
Microsoft.Build (21)
Construction\ProjectItemGroupElement.cs (2)
72
return
Count
== 0;
75
if (
Count
== 0)
Construction\ProjectRootElement.cs (2)
999
if (itemGroupToAddTo == null && itemGroup.
Count
== 0)
1009
if (itemGroupToAddTo?.
Count
> 0)
Definition\Project.cs (8)
2060
if (Xml.
Count
> 0) // don't log empty projects, evaluation is not interesting
3067
if (group.
Count
== 0 || MSBuildNameIgnoreCaseComparer.Default.Equals(itemType, group.Items.First().ItemType))
3082
if (groupToAppendTo.
Count
== 0 ||
3165
if (parent.
Count
== 0)
3443
if ((metadata?.Any() == true) || candidateExistingItemXml.
Count
> 0)
3655
if (parent.
Count
== 0)
3872
if (itemGroupToAddTo == null && itemGroupXml.
Count
== 0)
3884
if (itemGroupToAddTo == null || itemGroupToAddTo.
Count
== 0)
Definition\ProjectItem.cs (1)
705
if (_xml.
Count
== 0 /* no metadata */ && _project.IsSuitableExistingItemXml(_xml, name, null /* no metadata */) && !FileMatcher.HasWildcardsSemicolonItemOrPropertyReferences(name))
Evaluation\Evaluator.cs (6)
426
List<ProjectTaskInstanceChild> taskOutputs = new List<ProjectTaskInstanceChild>(taskElement.
Count
);
468
List<ProjectPropertyGroupTaskPropertyInstance> properties = new List<ProjectPropertyGroupTaskPropertyInstance>(propertyGroupElement.
Count
);
498
List<ProjectItemGroupTaskItemInstance> items = new List<ProjectItemGroupTaskItemInstance>(itemGroupElement.
Count
);
549
List<ProjectTargetInstanceChild> targetChildren = new List<ProjectTargetInstanceChild>(targetElement.
Count
);
794
if (_projectRootElement.
Count
> 0) // VB/C# will new up empty projects; they aren't worth recording
810
string output = String.Format(CultureInfo.CurrentUICulture, "###: MSBUILD: Evaluating or reevaluating project {0} with {1} global properties and {2} tools version, child count {3}, CurrentSolutionConfigurationContents hash {4} other properties:\n{5}", _projectRootElement.FullPath, globalPropertiesCount, _data.Toolset.ToolsVersion, _projectRootElement.
Count
, hash, propertyDump);
Instance\TaskRegistry.cs (1)
425
if (projectUsingTaskXml.
Count
> 0)
ObjectModelRemoting\ConstructionObjectLinks\ProjectElementContainerLink.cs (1)
17
/// Access to remote <see cref="ProjectElementContainer.
Count
"/>.
Microsoft.Build.Engine.OM.UnitTests (32)
Construction\ConstructionEditing_Tests.cs (22)
41
Assert.Equal(1, project.
Count
);
42
Assert.Equal(0, target.
Count
);
68
Assert.Equal(1, project.
Count
);
92
Assert.Equal(2, project.
Count
);
425
Assert.Equal(1, project.
Count
);
452
Assert.Equal(2, project.
Count
);
529
Assert.Equal(3, project.
Count
);
553
Assert.Equal(1, project.
Count
);
574
Assert.Equal(1, project.
Count
);
1344
Assert.Equal(1, project.
Count
);
1368
Assert.Equal(1, project.
Count
);
1387
Assert.Equal(0, project.
Count
);
1403
Assert.Equal(0, target1.
Count
);
1425
Assert.Equal(2, project.
Count
);
1451
Assert.Equal(2, project.
Count
);
1473
Assert.Equal(1, project.
Count
);
2386
Assert.Equal(0, group1.
Count
);
2409
Assert.Equal(0, group1.
Count
);
2432
Assert.Equal(0, group1.
Count
);
2455
Assert.Equal(0, group1.
Count
);
2478
Assert.Equal(0, group1.
Count
);
2502
Assert.Equal(1, group1.
Count
);
Construction\ProjectImportGroupElement_Tests.cs (3)
271
Assert.Equal(2, importGroups[0].
Count
);
303
Assert.Equal(2, importGroups[0].
Count
);
304
Assert.Equal(1, importGroups[1].
Count
);
Construction\ProjectUsingTaskElement_Tests.cs (1)
424
Assert.Equal(2, usingTask.
Count
);
Construction\UsingTaskParameterGroup_Tests.cs (2)
67
Assert.Equal(0, parameterGroup.
Count
);
79
Assert.Equal(2, parameterGroup.
Count
);
Definition\ProjectItem_Tests.cs (1)
1903
Assert.Equal(0, item.Xml.
Count
);
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (2)
423
Assert.Equal(realXml.
Count
, viewXml.
Count
);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectElementContainerLink.cs (1)
17
public int Count => ContainerXml.
Count
;