SnapDotNet.Apps.Notifications.ToastContent.ToastNotificationBase.ValidateCommands C# (CSharp) Method

ValidateCommands() private method

private ValidateCommands ( ) : void
return void
                private void ValidateCommands()
                {
                    if (StrictValidation)
                    {
                        if (IsIncomingCallToast() && IsAlarmToast())
                        {
                            throw new NotificationContentValidationException(
                                    "IncomingCall and Alarm properties cannot be included on a single toast.");
                        }

                        if (!IncomingCallCommands.ShowVideoCommand && !string.IsNullOrEmpty(IncomingCallCommands.VideoArgument))
                        {
                            throw new NotificationContentValidationException(
                                    "Video argument should not be set if the Video button is not shown.");
                        }

                        if (!IncomingCallCommands.ShowVoiceCommand && !string.IsNullOrEmpty(IncomingCallCommands.VoiceArgument))
                        {
                            throw new NotificationContentValidationException(
                                    "Voice argument should not be set if the Voice button is not shown.");
                        }

                        if (!IncomingCallCommands.ShowDeclineCommand && !string.IsNullOrEmpty(IncomingCallCommands.DeclineArgument))
                        {
                            throw new NotificationContentValidationException(
                                    "Decline argument should not be set if the Video button is not shown.");
                        }

                        if (!AlarmCommands.ShowSnoozeCommand && !string.IsNullOrEmpty(AlarmCommands.SnoozeArgument))
                        {
                            throw new NotificationContentValidationException(
                                    "Snooze argument should not be set if the Snooze button is not shown.");
                        }

                        if (!AlarmCommands.ShowDismissCommand && !string.IsNullOrEmpty(AlarmCommands.DismissArgument))
                        {
                            throw new NotificationContentValidationException(
                                    "Dismiss argument should not be set if the Dismiss button is not shown.");
                        }
                    }
                }