-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from ethanmoffat/proper_optional
Remove EOLib.Optional and replace with Optional nuget package. Reference Optional nuget package and replace usages of old Optional. Use functional approach to handling optional values. Replace some usages of null with Optional.
- Loading branch information
Showing
62 changed files
with
804 additions
and
788 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
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 |
---|---|---|
@@ -1,28 +1,29 @@ | ||
using System.Collections.Generic; | ||
using AutomaticTypeMapper; | ||
using EOLib.Domain.Character; | ||
using Optional; | ||
|
||
namespace EOLib.Domain.Login | ||
{ | ||
public interface ICharacterSelectorRepository | ||
{ | ||
IReadOnlyList<ICharacter> Characters { get; set; } | ||
|
||
ICharacter CharacterForDelete { get; set; } | ||
Option<ICharacter> CharacterForDelete { get; set; } | ||
} | ||
|
||
public interface ICharacterSelectorProvider | ||
{ | ||
IReadOnlyList<ICharacter> Characters { get; } | ||
|
||
ICharacter CharacterForDelete { get; } | ||
Option<ICharacter> CharacterForDelete { get; } | ||
} | ||
|
||
[AutoMappedType(IsSingleton = true)] | ||
public class CharacterSelectorRepository : ICharacterSelectorRepository, ICharacterSelectorProvider | ||
{ | ||
public IReadOnlyList<ICharacter> Characters { get; set; } | ||
|
||
public ICharacter CharacterForDelete { get; set; } | ||
public Option<ICharacter> CharacterForDelete { get; set; } | ||
} | ||
} |
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
Oops, something went wrong.