Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
65 lines (57 sloc)
1.57 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace WinTail | |
{ | |
class Messages | |
{ | |
#region Neutral/system messages | |
/// <summary> | |
/// Marker class to continue processing. | |
/// </summary> | |
public class ContinueProcessing { } | |
#endregion | |
#region Success messages | |
/// <summary> | |
/// Base class for signalling that user input was valid. | |
/// </summary> | |
public class InputSuccess | |
{ | |
public InputSuccess(string reason) | |
{ | |
Reason = reason; | |
} | |
public string Reason { get; private set; } | |
} | |
#endregion | |
#region Error messages | |
/// <summary> | |
/// Base class for signalling that user input was invalid. | |
/// </summary> | |
public class InputError | |
{ | |
public InputError(string reason) | |
{ | |
Reason = reason; | |
} | |
public string Reason { get; private set; } | |
} | |
/// <summary> | |
/// User provided blank input. | |
/// </summary> | |
public class NullInputError : InputError | |
{ | |
public NullInputError(string reason) : base(reason) { } | |
} | |
/// <summary> | |
/// User provided invalid input (currently, input w/ odd # chars) | |
/// </summary> | |
public class ValidationError : InputError | |
{ | |
public ValidationError(string reason) : base(reason) { } | |
} | |
#endregion | |
} | |
} |