17 instantiations of ProjectMetadataInstance
Microsoft.Build (15)
Instance\ProjectInstance.cs (3)
999result = instanceProvider.GetOrSetImmutableInstance(new ProjectMetadataInstance(projectMetadata)); 3344IEnumerable<ProjectMetadataInstance> projectMetadataInstances = item.DirectMetadata.Select(directMetadatum => new ProjectMetadataInstance(directMetadatum)); 3402IEnumerable<ProjectMetadataInstance> projectMetadataInstances = item.DirectMetadata.Select(directMetadatum => new ProjectMetadataInstance(directMetadatum));
Instance\ProjectItemDefinitionInstance.cs (2)
62IEnumerable<ProjectMetadataInstance> projectMetadataInstances = itemDefinition.Metadata.Select(originalMetadata => new ProjectMetadataInstance(originalMetadata)); 201ProjectMetadataInstance metadatum = new ProjectMetadataInstance(xml.Name, evaluatedValue);
Instance\ProjectItemInstance.cs (8)
129IEnumerable<ProjectMetadataInstance> directMetadataInstances = directMetadata.Select(metadatum => new ProjectMetadataInstance(metadatum.Key, metadatum.Value)); 608IEnumerable<ProjectMetadataInstance> projectMetadataInstances = metadataList.Select(metadatum => new ProjectMetadataInstance(metadatum.Key, metadatum.Value)); 1085_directMetadata.ImportProperties(metadata.Select(kvp => new ProjectMetadataInstance(kvp.Key, kvp.Value, allowItemSpecModifiers: true))); 1794return new ProjectMetadataInstance(interner.GetString(key), interner.GetString(value), allowItemSpecModifiers: true); 1861ProjectMetadataInstance metadatum = new ProjectMetadataInstance(name, metadataValueEscaped, allowItemSpecModifiers /* may not be built-in metadata name */); 1883ProjectMetadataInstance metadatum = new ProjectMetadataInstance(name, evaluatedValueEscaped, true /* may be built-in metadata name */); 1895.Select(item => new ProjectMetadataInstance(item.Key, item.Value, true /* may be built-in metadata name */)); 2063IEnumerable<ProjectMetadataInstance> projectMetadataInstances = metadataList.Select(metadatum => new ProjectMetadataInstance(metadatum.Key.Name, metadatum.Value));
Instance\ProjectMetadataInstance.cs (2)
221return new ProjectMetadataInstance(_name, _escapedValue, true /* allow built-in metadata names */); 229return new ProjectMetadataInstance(translator);
Microsoft.Build.Engine.UnitTests (2)
Instance\ProjectMetadataInstance_Internal_Tests.cs (1)
41ProjectMetadataInstance metadata = new ProjectMetadataInstance("m1", "v1", false);
Instance\TaskItem_Tests.cs (1)
229directMetadata.Set(new(name, value));
192 references to ProjectMetadataInstance
Microsoft.Build (164)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
185foreach (ProjectMetadataInstance metadatum in item.Metadata)
Instance\ProjectInstance.cs (60)
77public class ProjectInstance : IPropertyProvider<ProjectPropertyInstance>, IItemProvider<ProjectItemInstance>, IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>, ITranslatable 560IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance> thisAsIEvaluatorData = this; 742((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, 744((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, 746((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, 748((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, 973IDictionary<string, ProjectMetadataInstance> metadata = null; 976metadata = new ImmutableElementCollectionConverter<ProjectMetadata, ProjectMetadataInstance>( 990private static ProjectMetadataInstance ConvertCachedProjectMetadataToInstance(ProjectMetadata projectMetadata) 992ProjectMetadataInstance result = null; 994if (projectMetadata is IImmutableInstanceProvider<ProjectMetadataInstance> instanceProvider) 1114bool IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.CanEvaluateElementsWithFalseConditions => false; 1281TaskRegistry IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.TaskRegistry 1298Toolset IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.Toolset 1309string IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.SubToolsetVersion 1323string IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ExplicitToolsVersion 1333PropertyDictionary<ProjectPropertyInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.GlobalPropertiesDictionary 1340PropertyDictionary<ProjectPropertyInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.EnvironmentVariablePropertiesDictionary 1348ISet<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.GlobalPropertiesToTreatAsLocal 1364PropertyDictionary<ProjectPropertyInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.Properties 1374IEnumerable<ProjectItemDefinitionInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ItemDefinitionsEnumerable 1384IItemDictionary<ProjectItemInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.Items 1395List<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.InitialTargets 1413List<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.DefaultTargets 1431IDictionary<string, List<TargetSpecification>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.BeforeTargets 1441IDictionary<string, List<TargetSpecification>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AfterTargets 1454Dictionary<string, List<string>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ConditionedProperties 1468bool IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ShouldEvaluateForDesignTime 1630public static string GetMetadataValueEscaped(ProjectMetadataInstance metadatum) 1685void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>. 1695void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.FinishEvaluation() 1705void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddItem(ProjectItemInstance item) 1716void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddItemIgnoringCondition(ProjectItemInstance item) 1725IItemDefinition<ProjectMetadataInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddItemDefinition(string itemType) 1743void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddToAllEvaluatedPropertiesList(ProjectPropertyInstance property) 1757void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddToAllEvaluatedItemDefinitionMetadataList(ProjectMetadataInstance itemDefinitionMetadatum) 1771void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddToAllEvaluatedItemsList(ProjectItemInstance item) 1779IItemDefinition<ProjectMetadataInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.GetItemDefinition(string itemType) 1794ProjectPropertyInstance IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.SetProperty(string name, string evaluatedValueEscaped, bool isGlobalProperty, bool mayBeReserved, LoggingContext loggingContext, bool isEnvironmentVariable) 1807ProjectPropertyInstance IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.SetProperty(ProjectPropertyElement propertyElement, string evaluatedValueEscaped, LoggingContext loggingContext) 1818ProjectTargetInstance IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.GetTarget(string targetName) 1831void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddTarget(ProjectTargetInstance target) 1839void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.RecordImport( 1846((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).RecordImportWithDuplicates(importElement, import, versionEvaluated); 1852void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.RecordImportWithDuplicates(ProjectImportElement importElement, ProjectRootElement import, int versionEvaluated) 2743if (((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).BeforeTargets.TryGetValue(target, out beforeTargetsForTarget)) 2760if (((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).AfterTargets.TryGetValue(target, out afterTargetsForTarget)) 3171Evaluator<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.Evaluate( 3224((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).BeforeTargets = CreateCloneDictionary(beforeTargets, StringComparer.OrdinalIgnoreCase); 3225((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).AfterTargets = CreateCloneDictionary(afterTargets, StringComparer.OrdinalIgnoreCase); 3339CopyOnWritePropertyDictionary<ProjectMetadataInstance> directMetadata = null; 3342directMetadata = new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 3344IEnumerable<ProjectMetadataInstance> projectMetadataInstances = item.DirectMetadata.Select(directMetadatum => new ProjectMetadataInstance(directMetadatum)); 3391ICopyOnWritePropertyDictionary<ProjectMetadataInstance> directMetadata = null; 3396directMetadata = new ImmutablePropertyCollectionConverter<ProjectMetadata, ProjectMetadataInstance>(metadataDict, ConvertCachedProjectMetadataToInstance); 3400directMetadata = new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 3402IEnumerable<ProjectMetadataInstance> projectMetadataInstances = item.DirectMetadata.Select(directMetadatum => new ProjectMetadataInstance(directMetadatum));
Instance\ProjectItemDefinitionInstance.cs (19)
25public class ProjectItemDefinitionInstance : IKeyed, IMetadataTable, IItemDefinition<ProjectMetadataInstance>, ITranslatable, IItemTypeDefinition 36private IDictionary<string, ProjectMetadataInstance> _metadata; 61var copyOnWriteMetadataDictionary = new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 62IEnumerable<ProjectMetadataInstance> projectMetadataInstances = itemDefinition.Metadata.Select(originalMetadata => new ProjectMetadataInstance(originalMetadata)); 74internal ProjectItemDefinitionInstance(string itemType, IDictionary<string, ProjectMetadataInstance> metadata) 101public ICollection<ProjectMetadataInstance> Metadata 107return ReadOnlyEmptyCollection<ProjectMetadataInstance>.Instance; 110return new ReadOnlyCollection<ProjectMetadataInstance>(_metadata.Values); 142public ProjectMetadataInstance GetMetadata(string name) 180ProjectMetadataInstance metadatum = GetMetadata(name); 196ProjectMetadataInstance IItemDefinition<ProjectMetadataInstance>.SetMetadata(ProjectMetadataElement xml, string evaluatedValue, ProjectMetadataInstance predecessor) 199_metadata ??= new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 201ProjectMetadataInstance metadatum = new ProjectMetadataInstance(xml.Name, evaluatedValue); 216ProjectMetadataInstance metadataInstance = kvp.Value; 226translator.TranslateDictionary(ref _metadata, ProjectMetadataInstance.FactoryForDeserialization, CreateMetadataCollection); 239private static IDictionary<string, ProjectMetadataInstance> CreateMetadataCollection(int capacity) 241return new CopyOnWritePropertyDictionary<ProjectMetadataInstance>();
Instance\ProjectItemInstance.cs (74)
35IItem<ProjectMetadataInstance>, 103ICopyOnWritePropertyDictionary<ProjectMetadataInstance> directMetadata, 124CopyOnWritePropertyDictionary<ProjectMetadataInstance> metadata = null; 128metadata = new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 129IEnumerable<ProjectMetadataInstance> directMetadataInstances = directMetadata.Select(metadatum => new ProjectMetadataInstance(metadatum.Key, metadatum.Value)); 253public IEnumerable<ProjectMetadataInstance> Metadata 365public ProjectMetadataInstance GetMetadata(string name) 400public ProjectMetadataInstance SetMetadata(string name, string evaluatedValue) 455ProjectMetadataInstance IItem<ProjectMetadataInstance>.SetMetadata(ProjectMetadataElement metadataElement, string evaluatedInclude) 606CopyOnWritePropertyDictionary<ProjectMetadataInstance> metadata = new(); 608IEnumerable<ProjectMetadataInstance> projectMetadataInstances = metadataList.Select(metadatum => new ProjectMetadataInstance(metadatum.Key, metadatum.Value)); 631internal void SetMetadata(ICopyOnWritePropertyDictionary<ProjectMetadataInstance> metadataDictionary) 683foreach (ProjectMetadataInstance metadataInstance in Metadata) 703ICopyOnWritePropertyDictionary<ProjectMetadataInstance> directMetadata, 756IItem<ProjectMetadataInstance>, 787private ICopyOnWritePropertyDictionary<ProjectMetadataInstance> _directMetadata; 830ICopyOnWritePropertyDictionary<ProjectMetadataInstance> directMetadata, 945ICopyOnWritePropertyDictionary<ProjectMetadataInstance> metadataCollection = MetadataCollection; 949foreach (ProjectMetadataInstance metadatum in (IEnumerable<ProjectMetadataInstance>)metadataCollection) 1084_directMetadata ??= new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 1094private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager(ICopyOnWritePropertyDictionary<ProjectMetadataInstance> list) 1098foreach (var projectMetadataInstance in list.Values) 1110private IEnumerable<KeyValuePair<string, string>> EnumerateMetadata(ICopyOnWritePropertyDictionary<ProjectMetadataInstance> list) 1112foreach (var projectMetadataInstance in list.Values) 1129internal ICopyOnWritePropertyDictionary<ProjectMetadataInstance> MetadataCollection 1142return (_directMetadata == null) ? new CopyOnWritePropertyDictionary<ProjectMetadataInstance>() : _directMetadata.DeepClone(); // copy on write! 1145CopyOnWritePropertyDictionary<ProjectMetadataInstance> allMetadata = new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 1151IEnumerable<ProjectMetadataInstance> metaData() 1157foreach (ProjectMetadataInstance metadatum in _itemDefinitions[i].Metadata) 1173foreach (ProjectMetadataInstance metadatum in (IEnumerable<ProjectMetadataInstance>)_directMetadata) 1189IEnumerable<ProjectMetadataInstance> IItem<ProjectMetadataInstance>.Metadata => MetadataCollection; 1288ProjectMetadataInstance IItem<ProjectMetadataInstance>.GetMetadata(string name) 1297ProjectMetadataInstance IItem<ProjectMetadataInstance>.SetMetadata(ProjectMetadataElement metadataElement, string evaluatedInclude) 1332ProjectMetadataInstance metadatum; 1449IEnumerable<ProjectMetadataInstance> metadataEnumerable = MetadataCollection; 1467foreach (ProjectMetadataInstance metadatum in (IEnumerable<ProjectMetadataInstance>)MetadataCollection) 1499foreach (ProjectMetadataInstance metadatum in (IEnumerable<ProjectMetadataInstance>)metadata) 1516foreach (ProjectMetadataInstance metadatum in (IEnumerable<ProjectMetadataInstance>)MetadataCollection) 1549ProjectMetadataInstance.FactoryForDeserialization, 1550(capacity) => new CopyOnWritePropertyDictionary<ProjectMetadataInstance>()); 1641foreach (ProjectMetadataInstance metadatum in (IEnumerable<ProjectMetadataInstance>)_directMetadata) 1647ICopyOnWritePropertyDictionary<ProjectMetadataInstance> otherMetadata = other.MetadataCollection; 1654foreach (ProjectMetadataInstance metadatum in (IEnumerable<ProjectMetadataInstance>)otherMetadata) 1764ICopyOnWritePropertyDictionary<ProjectMetadataInstance> temp = MetadataCollection; 1771foreach (ProjectMetadataInstance metadatum in (IEnumerable<ProjectMetadataInstance>)temp) 1789IEnumerable<ProjectMetadataInstance> metaData = 1796_directMetadata = new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 1811internal ProjectMetadataInstance GetMetadataObject(string name) 1813ProjectMetadataInstance value = null; 1832internal void SetMetadata(ICopyOnWritePropertyDictionary<ProjectMetadataInstance> metadata) 1856internal ProjectMetadataInstance SetMetadataObject(string name, string metadataValueEscaped, bool allowItemSpecModifiers) 1860_directMetadata ??= new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 1861ProjectMetadataInstance metadatum = new ProjectMetadataInstance(name, metadataValueEscaped, allowItemSpecModifiers /* may not be built-in metadata name */); 1882_directMetadata ??= new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 1883ProjectMetadataInstance metadatum = new ProjectMetadataInstance(name, evaluatedValueEscaped, true /* may be built-in metadata name */); 1891_directMetadata ??= new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 1942private ProjectMetadataInstance GetItemDefinitionMetadata(string metadataName) 1950ProjectMetadataInstance metadataFromDefinition = _itemDefinitions[i].GetMetadata(metadataName); 2062CopyOnWritePropertyDictionary<ProjectMetadataInstance> metadata = new CopyOnWritePropertyDictionary<ProjectMetadataInstance>(); 2063IEnumerable<ProjectMetadataInstance> projectMetadataInstances = metadataList.Select(metadatum => new ProjectMetadataInstance(metadatum.Key.Name, metadatum.Value));
Instance\ProjectMetadataInstance.cs (5)
21public class ProjectMetadataInstance : IEquatable<ProjectMetadataInstance>, ITranslatable, IMetadatum, IImmutable 195bool IEquatable<ProjectMetadataInstance>.Equals(ProjectMetadataInstance other) 219public ProjectMetadataInstance DeepClone() 227internal static ProjectMetadataInstance FactoryForDeserialization(ITranslator translator)
ObjectModelRemoting\LinkedObjectFactory.cs (5)
288private class LinkedProjectMetadata : ProjectMetadata, ILinkableObject, IImmutableInstanceProvider<ProjectMetadataInstance> 290private ProjectMetadataInstance _immutableInstance; 298public ProjectMetadataInstance ImmutableInstance => _immutableInstance; 300public ProjectMetadataInstance GetOrSetImmutableInstance(ProjectMetadataInstance instance)
Microsoft.Build.Engine.OM.UnitTests (3)
Instance\ProjectMetadataInstance_Tests.cs (3)
23ProjectMetadataInstance metadata = GetMetadataInstance(); 32private static ProjectMetadataInstance GetMetadataInstance() 37ProjectMetadataInstance metadata = item.SetMetadata("m", "m1");
Microsoft.Build.Engine.UnitTests (12)
Instance\ProjectMetadataInstance_Internal_Tests.cs (8)
26ProjectMetadataInstance metadata = GetMetadataInstance(); 28ProjectMetadataInstance clone = metadata.DeepClone(); 41ProjectMetadataInstance metadata = new ProjectMetadataInstance("m1", "v1", false); 43TranslationHelpers.GetWriteTranslator().Translate(ref metadata, ProjectMetadataInstance.FactoryForDeserialization); 44ProjectMetadataInstance deserializedMetadata = null; 45TranslationHelpers.GetReadTranslator().Translate(ref deserializedMetadata, ProjectMetadataInstance.FactoryForDeserialization); 54private static ProjectMetadataInstance GetMetadataInstance() 59ProjectMetadataInstance metadata = item.SetMetadata("m", "m1");
Instance\TaskItem_Tests.cs (2)
197ICopyOnWritePropertyDictionary<ProjectMetadataInstance> metadata = item.MetadataCollection; 224CopyOnWritePropertyDictionary<ProjectMetadataInstance> directMetadata = new();
TestComparers\ProjectInstanceModelTestComparers.cs (2)
14Microsoft.Build.Execution.ProjectMetadataInstance, Microsoft.Build.Execution.ProjectItemDefinitionInstance>; 249Assert.Equal(x.Metadata, y.Metadata, EqualityComparer<ProjectMetadataInstance>.Default);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (13)
TargetTests.cs (13)
172var metadata = item.Metadata.Single(); 205var metadata = item.Metadata.Single(); 234var metadata = item.Metadata.Single(); 265var itemType = item.Metadata.SingleOrDefault(m => m.Name == "ItemType"); 269var metaName = item.Metadata.SingleOrDefault(m => m.Name == "MetadataName"); 273var customMeta = item.Metadata.SingleOrDefault(m => m.Name == metaName.EvaluatedValue); 307var itemType = item.Metadata.SingleOrDefault(m => m.Name == "ItemType"); 311var metaName = item.Metadata.SingleOrDefault(m => m.Name == "MetadataName"); 315var customMeta = item.Metadata.SingleOrDefault(m => m.Name == metaName.EvaluatedValue); 347var itemType = item.Metadata.SingleOrDefault(m => m.Name == "ItemType"); 351var metaName = item.Metadata.SingleOrDefault(m => m.Name == "MetadataName"); 382var itemType = item.Metadata.SingleOrDefault(m => m.Name == "ItemType"); 386var metaName = item.Metadata.SingleOrDefault(m => m.Name == "MetadataName");