BuildingCoder.CmdCollectorPerformance.GetElementsOfTypeUsingLinq C# (CSharp) Метод

GetElementsOfTypeUsingLinq() приватный Метод

Return a list of all elements matching the given type using a LINQ query to test the element type.
private GetElementsOfTypeUsingLinq ( Type type ) : IEnumerable
type Type
Результат IEnumerable
        IEnumerable<Element> GetElementsOfTypeUsingLinq(
            Type type)
        {
            FilteredElementCollector a
            = GetNonElementTypeElements();

              IEnumerable<Element> b =
            from e in a
            where e.GetType().Equals( type )
            select e;

              return b;
        }