protected override void BeginProcessing()

in src/Modules/Workspaces/Commands.Workspaces/GetPowerBIWorkspace.cs [89:120]


        protected override void BeginProcessing()
        {
            base.BeginProcessing();

            if (this.First > 5000)
            {
                this.Logger.ThrowTerminatingError($"{nameof(this.First)} cannot be greater than 5000.");
            }

            if (!string.IsNullOrEmpty(this.User) && this.Scope.Equals(PowerBIUserScope.Individual))
            {
                this.Logger.ThrowTerminatingError($"{nameof(this.User)} is only applied when -{nameof(this.Scope)} is set to {nameof(PowerBIUserScope.Organization)}");
            }

            if (this.Include != null)
            {
                if (this.Include.Any() && this.Scope.Equals(PowerBIUserScope.Individual))
                {
                    this.Logger.ThrowTerminatingError($"{nameof(this.Include)} is only applied when -{nameof(this.Scope)} is set to {nameof(PowerBIUserScope.Organization)}");
                }

                if (this.Include.Contains(ArtifactType.All) && this.Include.Count() > 1)
                {
                    this.Logger.ThrowTerminatingError($"Parameter {nameof(this.Include)} is invalid. Enum {nameof(ArtifactType.All)} cannot be combined with other {nameof(ArtifactType)}");
                }
            }

            if (this.Deleted.IsPresent && this.Orphaned.IsPresent)
            {
                this.Logger.ThrowTerminatingError($"{nameof(this.Deleted)} & {nameof(this.Orphaned)} cannot be used together.");
            }
        }