List UniqueLuminaries GetUniqueProjectLumi naries var allLuminaries Ge

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
List<UniqueLuminaries> GetUniqueProjectLuminaries()
{
var allLuminaries = GetAllProjectLuminaries();
var uniqueLuminaries = new List<UniqueLuminaries>();
// changed 10/07/13 by Owen Smith #49118
foreach (var lamp in allLuminaries)
{
if (uniqueLuminaries.Exists(uniqLamp => IsSameLuminaireInProject(uniqLamp.Luminaire, lamp)))
continue;
else
uniqueLuminaries.Add(new UniqueLuminaries()
{
Luminaire = lamp,
Count = allLuminaries.Count(lm => IsSameLuminaireInProject(lm, lamp))
});
}
return uniqueLuminaries;
}