Skip to content

Commit f6f5808

Browse files
committed
Parametrized messages.
1 parent a203f9e commit f6f5808

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/Aneejian.PowerPoint.Downsizer/Constants.Messages.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ public static partial class Constants
55
public static class Messages
66
{
77
public const string NothingToRemove = "Nothing to remove. All layouts and master slides in use.";
8+
9+
public const string SlideMasterDonwsizeSuccess = "Successfully removed unused custom layouts and master slides.";
10+
11+
public const string SlideMasterDonwsizeFailed = "Failed to remove unused custom layouts and master slides.";
812
}
913
}
1014
}

src/Aneejian.PowerPoint.Downsizer/SlideMaster/Downsizer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ public async Task<IDownsizeResponse> Downsize(IDownsizePotential potential, IDow
2727
}
2828

2929
downsizeResponse.IsSuccess = true;
30-
downsizeResponse.ResultMessage = "Successfully removed unused custom layouts and master slides.";
30+
downsizeResponse.ResultMessage = Constants.Messages.SlideMasterDonwsizeSuccess;
3131
}
3232
catch (Exception e)
3333
{
3434
downsizeResponse.Exception = e;
35-
downsizeResponse.ResultMessage = "Failed to remove unused custom layouts and master slides.";
35+
downsizeResponse.ResultMessage = Constants.Messages.SlideMasterDonwsizeFailed;
3636
}
3737

3838
updateStat?.Invoke(downsizeResponse);

0 commit comments

Comments
 (0)