Created
September 28, 2017 10:17
-
-
Save NMZivkovic/402db16e753413e4deda73dee78e4a13 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
try | |
{ | |
Console.WriteLine("Enter entity type:"); | |
var entytyType = (EntityType)Enum.Parse(typeof(EntityType), Console.ReadLine(), true); | |
Console.WriteLine("Enter new value:"); | |
var modificationValue = Convert.ToInt32(Console.ReadLine()); | |
var entityFactory = new EntityFactory(); | |
var entity = entityFactory.GetEntityBasedOnType(entytyType); | |
var result = entity.GetNewValue(modificationValue); | |
Console.WriteLine(result); | |
Console.ReadLine(); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.Message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment