Microsoft.Azure.Commands.Insights.EventCmdletBase.AddConditionIfPResent C# (CSharp) Method

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
        protected string AddConditionIfPResent(string currentQueryFilter, string name, string value)
        {
            return !string.IsNullOrWhiteSpace(value) ? string.Format("{0} and {1} eq '{2}'", currentQueryFilter, name, value) : currentQueryFilter;
        }