33 references to Count
Microsoft.Build (29)
BackEnd\Components\Communications\TranslatorExtensions.cs (1)
52int count = value.Count;
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
329Dictionary<string, string> globalProperties = new(configuration.GlobalProperties.Count, StringComparer.OrdinalIgnoreCase); 622var globalProperties = new Dictionary<string, string>(configuration.GlobalProperties.Count, StringComparer.OrdinalIgnoreCase);
BackEnd\Components\RequestBuilder\Lookup.cs (1)
403SecondaryProperties ??= new PropertyDictionary<ProjectPropertyInstance>(PrimaryPropertySets.Count);
BackEnd\Shared\ConfigurationMetadata.cs (1)
177$"{truncatedProjectFile}, #GlobalProps={GlobalProperties.Count}";
Collections\PropertyDictionary.cs (3)
138int ICollection<KeyValuePair<string, T>>.Count => Count; 278if (Count != other.Count)
Definition\Project.cs (3)
2118return _data.GlobalPropertiesDictionary.Count; 2148if (_data.GlobalPropertiesDictionary.Count == 0) 2153var dictionary = new Dictionary<string, string>(_data.GlobalPropertiesDictionary.Count, MSBuildNameIgnoreCaseComparer.Default);
Definition\ProjectCollection.cs (2)
564if (_globalProperties.Count == 0) 569dictionary = new Dictionary<string, string>(_globalProperties.Count, MSBuildNameIgnoreCaseComparer.Default);
Definition\ProjectItem.cs (3)
272{ return Link != null ? Link.DirectMetadata.Count : _directMetadata != null ? _directMetadata.Count : 0; } 832List<ProjectMetadata> temporary = new List<ProjectMetadata>(_directMetadata.Count); 839_directMetadata = new PropertyDictionary<ProjectMetadata>(_directMetadata.Count);
Definition\ProjectItemDefinition.cs (1)
104get { return Link != null ? Link.Metadata.Count : (_metadata == null) ? 0 : _metadata.Count; }
Definition\Toolset.cs (2)
926int count = _environmentProperties.Count + reservedProperties.Count + Properties.Values.Count + _globalProperties.Count + 1;
Evaluation\Evaluator.cs (2)
824List<P> list = new(dictionary.Count); 1255return _data.GlobalPropertiesDictionary.Count;
Instance\ProjectInstance.cs (8)
709_properties = new PropertyDictionary<ProjectPropertyInstance>(that._properties.Count); 723_globalProperties = new PropertyDictionary<ProjectPropertyInstance>(that._globalProperties.Count); 731new PropertyDictionary<ProjectPropertyInstance>(that._environmentVariableProperties.Count); 948if (_globalProperties == null /* cached */ || _globalProperties.Count == 0) 953Dictionary<string, string> dictionary = new Dictionary<string, string>(_globalProperties.Count, MSBuildNameIgnoreCaseComparer.Default); 2403Dictionary<string, string> globalProperties = new Dictionary<string, string>(globalPropertiesInstances.Count, StringComparer.OrdinalIgnoreCase); 3089_environmentVariableProperties = new PropertyDictionary<ProjectPropertyInstance>(environmentVariableProperties.Count); 3102_globalProperties = new PropertyDictionary<ProjectPropertyInstance>(globalPropertiesDictionary.Count);
Microsoft.Build.Engine.UnitTests (4)
BackEnd\IntrinsicTask_Tests.cs (3)
44Assert.Equal(2, properties.Count); 944Assert.Equal(2, properties.Count); 1117Assert.Equal(2, properties.Count);
Collections\OMcollections_tests.cs (1)
47Assert.Equal(2, properties.Count);