File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
src/SimpleStateMachine.StructuralSearch Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ namespace SimpleStateMachine.StructuralSearch.Configurations
77 public class ConfigurationFile : IEquatable < ConfigurationFile >
88 {
99 // Use for deserialization
10- public ConfigurationFile ( )
10+ private ConfigurationFile ( )
1111 {
1212 Configurations = new List < Configuration > ( ) ;
1313 }
Original file line number Diff line number Diff line change @@ -7,14 +7,15 @@ namespace SimpleStateMachine.StructuralSearch.Helper
77{
88 public static class YmlHelper
99 {
10+ private static readonly IDeserializer Deserializer = new DeserializerBuilder ( )
11+ . WithNamingConvention ( PascalCaseNamingConvention . Instance )
12+ . EnablePrivateConstructors ( )
13+ . Build ( ) ;
14+
1015 public static ConfigurationFile Parse ( string filePath )
1116 {
12- var textReader = File . OpenText ( filePath ) ;
13- var deserializer = new DeserializerBuilder ( )
14- . WithNamingConvention ( PascalCaseNamingConvention . Instance )
15- . Build ( ) ;
16-
17- var cfg = deserializer . Deserialize < ConfigurationFile > ( textReader ) ;
17+ var textReader = File . OpenText ( filePath ) ;
18+ var cfg = Deserializer . Deserialize < ConfigurationFile > ( textReader ) ;
1819 return cfg ;
1920 }
2021 }
You can’t perform that action at this time.
0 commit comments