public static PSSentinelAlertRuleTemplate ConvertToPSType(this AlertRuleTemplate value) { var convertedFusionValue = value as FusionAlertRuleTemplate; if (convertedFusionValue != null) { return(convertedFusionValue.ConvertToPSType()); } var convertedMicrosoftSecurityIncidentCreationValue = value as MicrosoftSecurityIncidentCreationAlertRuleTemplate; if (convertedMicrosoftSecurityIncidentCreationValue != null) { return(convertedMicrosoftSecurityIncidentCreationValue.ConvertToPSType()); } var convertedScheduledValue = value as ScheduledAlertRuleTemplate; if (convertedScheduledValue != null) { return(convertedScheduledValue.ConvertToPSType()); } return(new PSSentinelAlertRuleTemplate() { Kind = "Error", Name = value.Name }); }
private void ValidateAlertRuleTemplate(AlertRuleTemplate AlertRuleTemplate) { Assert.NotNull(AlertRuleTemplate); }