private IEnumerable<FieldInheritanceDefinitionInfo> LoadDefinitionsFor(FieldDefinitionCollection fieldDefinitionCollection) { var inheritances = new FieldInheritanceDefinitionCollection(App); inheritances.Load(fieldDefinitionCollection.CopyIdsToArray()); foreach (FieldDefinition fieldDefinition in fieldDefinitionCollection) { var fieldId = fieldDefinition.Id; var foundInheritance = inheritances.FirstOrDefault(x => x.FieldId == fieldId); if (foundInheritance != null) { yield return CreateInfoInstance(fieldDefinition, foundInheritance); } else { yield return CreateInfoInstance(fieldDefinition); } } }
private IEnumerable <FieldInheritanceDefinitionInfo> LoadDefinitionsFor(FieldDefinitionCollection fieldDefinitionCollection) { var inheritances = new FieldInheritanceDefinitionCollection(App); inheritances.Load(fieldDefinitionCollection.CopyIdsToArray()); foreach (FieldDefinition fieldDefinition in fieldDefinitionCollection) { var fieldId = fieldDefinition.Id; var foundInheritance = inheritances.FirstOrDefault(x => x.FieldId == fieldId); if (foundInheritance != null) { yield return(CreateInfoInstance(fieldDefinition, foundInheritance)); } else { yield return(CreateInfoInstance(fieldDefinition)); } } }