/// <summary> /// Creates a new instance of an OpeningAction object, and initializes it with the specified properties. /// </summary> /// <param name="opening"></param> /// <param name="trigger"></param> /// <param name="action"></param> /// <param name="sequence"></param> public Process(Opening opening, ActionTrigger trigger, string action, int sequence = 0) { if (String.IsNullOrWhiteSpace(action)) { throw new ArgumentException("The argument 'action' cannot be null, empty or whitespace."); } this.OpeningId = opening?.Id ?? throw new ArgumentNullException(nameof(opening)); this.Opening = opening; this.Trigger = trigger; this.Action = action; this.Sequence = sequence; }