public LaunchOperation(LaunchSource source) { if (source == LaunchSource.Unknown) { throw new ArgumentException("Launch Source cannot be Unknown"); } Source = source; }
public ActionLaunchOperation(LaunchSource source, string actionKey, params ActionLaunchConfiguration[] configurations) : base(source) { if (source != LaunchSource.Secondary && source != LaunchSource.Jumplist) { throw new ArgumentException("Action Launch Operation can only be from a Secondary or JumpList launch source."); } if (string.IsNullOrWhiteSpace(actionKey)) { throw new ArgumentException("Action Key cannot be null, empty, or whitespace", nameof(actionKey)); } ActionKey = actionKey; this.configurations = new Dictionary <string, ActionLaunchConfiguration>(); foreach (var config in configurations) { this.configurations.Add(config.Action, config); } }