-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
104 additions
and
3 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using Neptuo; | ||
using Neptuo.Commands; | ||
using Neptuo.Models.Keys; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Money.Commands | ||
{ | ||
/// <summary> | ||
/// Changes a <see cref="Description"/> of the income with <see cref="IncomeKey"/>. | ||
/// </summary> | ||
public class ChangeIncomeDescription : Command | ||
{ | ||
/// <summary> | ||
/// Gets a key of the income to modify. | ||
/// </summary> | ||
public IKey IncomeKey { get; private set; } | ||
|
||
/// <summary> | ||
/// Gets a new description of the income. | ||
/// </summary> | ||
public string Description { get; private set; } | ||
|
||
/// <summary> | ||
/// Changes a <paramref name="description"/> of the income with <paramref name="incomeKey"/>. | ||
/// </summary> | ||
/// <param name="incomeKey">A key of the income to modify.</param> | ||
/// <param name="description">A new description of the income.</param> | ||
public ChangeIncomeDescription(IKey incomeKey, string description) | ||
{ | ||
Ensure.Condition.NotEmptyKey(incomeKey); | ||
Ensure.NotNull(description, "description"); | ||
IncomeKey = incomeKey; | ||
Description = description; | ||
} | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Money.Events | ||
{ | ||
/// <summary> | ||
/// An event raised when a description of the income has changed. | ||
/// </summary> | ||
public class IncomeDescriptionChanged : UserEvent | ||
{ | ||
/// <summary> | ||
/// Gets a new value of the description. | ||
/// </summary> | ||
public string Description { get; private set; } | ||
|
||
internal IncomeDescriptionChanged(string description) | ||
{ | ||
Description = description; | ||
} | ||
} | ||
} |
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