Microsoft.Azure.Commands.Insights.Utilities.ExtractCollectionFromResult C# (CSharp) Method

ExtractCollectionFromResult() public static method

public static ExtractCollectionFromResult ( this enumerator, bool fullDetails, List records, bool>.Func keepTheRecord ) : void
enumerator this
fullDetails bool
records List
keepTheRecord bool>.Func
return void
        public static void ExtractCollectionFromResult(this IEnumerator<EventData> enumerator, bool fullDetails, List<IPSEventData> records, Func<EventData, bool> keepTheRecord)
        {
            while (enumerator.MoveNext())
            {
                var current = enumerator.Current;
                if (keepTheRecord(current))
                {
                    records.Add(fullDetails ? (IPSEventData)new PSEventData(current) : (IPSEventData)new PSEventDataNoDetails(current));
                }
            }
        }
    }