internal static bool IfcUniquePropertySetNames(IOptionalItemSet <IfcPropertySetDefinition> hasPropertySets) { var asList = hasPropertySets.ToList(); var values = asList.Select(x => x.Name).ToList(); var isUnique = values.Distinct().Count() == asList.Count(); return(isUnique); }
public static void AddIfNotPresent(this IOptionalItemSet <CobieCategory> collection, CobieCategory item) { foreach (var cat in collection) { if (cat.Value == item.Value) { return; } } collection.Add(item); }
internal static bool IfcConsecutiveSegments(IOptionalItemSet <IfcSegmentIndexSelect> Segments) { throw new NotImplementedException(); //// todo: complete implementation //bool Result = true; //for (int iSegment = 1; iSegment <= HIINDEX(Segments); iSegment++) //{ // var tSegment = iSegment - 1; // //if (Segments[iSegment][HIINDEX(Segments[iSegment])] != Segments[iSegment + 1][1]) // //{ // // Result = false; // // continue; // //} //} //return Result; }