Microsoft.Azure.Commands.Insights.Alerts.GetAzureRmAlertHistoryCommand.KeepTheRecord C# (CSharp) Method

KeepTheRecord() protected method

A predicate to filter in/out the records from original list of records obtained from the SDK.

This method is intended to allow descendants of this class to further filter the results.

An example of this is when the filtering is needed based on EventSource and ResourceUri at the same time. The SDK does not allow these two fields to be in the query filter togheter. So the call should filter by one and then use this function to filter by the second one.

protected KeepTheRecord ( Microsoft.Azure.Insights.Models.EventData record ) : bool
record Microsoft.Azure.Insights.Models.EventData A record from the original list of records obtained from the sdk
return bool
        protected override bool KeepTheRecord(EventData record)
        {
            return string.IsNullOrWhiteSpace(this.ResourceId) || string.Equals(record.ResourceId, this.ResourceId, StringComparison.OrdinalIgnoreCase);
        }