C# Class Microsoft.Azure.Commands.Insights.EventCmdletBase

Base class for the Azure Insights SDK EventService Cmdlets
Inheritance: InsightsClientCmdletBase
Show file Open project: Azure/azure-powershell

Private Properties

Property Type Description
ProcessGeneralParameters string
ValidateDateTimeRangeAndAdddefaults string

Protected Methods

Method Description
AddConditionIfPResent ( string currentQueryFilter, string name, string value ) : string

Adds a condition to the query filter based on the give name and the value

GetDefaultQueryTimeRange ( ) : System.TimeSpan

Gets the default query time range

KeepTheRecord ( Microsoft.Azure.Insights.Models.EventData record ) : bool

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 Category 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.

ProcessParameters ( ) : string

Process the general parameters (i.e. defined in this class) and the particular parameters (i.e. the parameters added by the descendants of this class).

ProcessParticularParameters ( string currentQueryFilter ) : string

Process the parameters defined by the descendants of this class

ProcessRecordInternal ( ) : void

Execute the cmdlet

SetMaxEventsIfPresent ( string currentQueryFilter, string name, int value ) : void

Sets the max number of records to fetch

Private Methods

Method Description
ProcessGeneralParameters ( ) : string

Process the parameters defined by this class

ValidateDateTimeRangeAndAdddefaults ( ) : string

Validates that the range of dates (start / end) makes sense, it is not to great (less 15 days), and adds the defaul values if needed

Method Details

AddConditionIfPResent() protected method

Adds a condition to the query filter based on the give name and the value
protected AddConditionIfPResent ( string currentQueryFilter, string name, string value ) : string
currentQueryFilter string The current query filter
name string The name to be used in the new condition
value string The value to be used in the new condition.If this value is null, the currentQueryFilter is returned unmodified.
return string

GetDefaultQueryTimeRange() protected method

Gets the default query time range
protected GetDefaultQueryTimeRange ( ) : System.TimeSpan
return System.TimeSpan

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 Category 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

ProcessParameters() protected method

Process the general parameters (i.e. defined in this class) and the particular parameters (i.e. the parameters added by the descendants of this class).
protected ProcessParameters ( ) : string
return string

ProcessParticularParameters() protected abstract method

Process the parameters defined by the descendants of this class
protected abstract ProcessParticularParameters ( string currentQueryFilter ) : string
currentQueryFilter string The current query filter
return string

ProcessRecordInternal() protected method

Execute the cmdlet
protected ProcessRecordInternal ( ) : void
return void

SetMaxEventsIfPresent() protected method

Sets the max number of records to fetch
protected SetMaxEventsIfPresent ( string currentQueryFilter, string name, int value ) : void
currentQueryFilter string
name string
value int
return void