protected override void ProcessRecord() { if (SameFile == null) { throw new ArgumentNullException(nameof(SameFile)); } var result = IgnoreSameFileHelper.MarkIgnore(SameFile.Id, SameFile.IsIgnored); if (!result) { ThrowTerminatingError(new ErrorRecord( new InvalidOperationException("Cannot update this same file."), "ImageStore Update Same File", ErrorCategory.WriteError, null)); } }
protected override void ProcessRecord() { if (SameFile != null) { Id = SameFile.Id; } var result = IgnoreSameFileHelper.MarkIgnore(Id, false); if (!result) { ThrowTerminatingError(new ErrorRecord( new InvalidOperationException("Cannot update this same file."), "ImageStore Update Same File", ErrorCategory.WriteError, null)); } if (SameFile != null) { SameFile.IsIgnored = false; } }