Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IDictionary<Type, IParsingStrategy> Switch { get; } = new Dictionary<Type, IParsingStrategy>
- {
- { typeof(string), new StringParsingStrategy() },
- { typeof(int), new IntParsingStrategy() },
- { typeof(long), new LongParsingStrategy() },
- { typeof(double), new DoubleParsingStrategy() },
- { typeof(bool), new BoolParsingStrategy() },
- { typeof(sbyte), new SByteParsingStrategy() },
- { typeof(short), new ShortParsingStrategy() },
- { typeof(float), new FloatParsingStrategy() },
- { typeof(char), new CharParsingStrategy() },
- { typeof(decimal), new DecimalParsingStrategy() }
- };
- strategy = Switch[prop.PropertyType];
- strategy.Parsing(prop, EventTemplate, item);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement