@@ -7,17 +7,17 @@ namespace DDTool.Parsers;
77
88public static class MessageParser {
99 public static void ParseMessages ( XmlDocument doc , DataDictionary dd ) {
10- XmlNodeList nodeList = doc . SelectNodes ( "//messages/message" ) ;
10+ XmlNodeList nodeList = doc . SelectNodes ( "//messages/message" ) ! ;
1111 foreach ( XmlNode msgNode in nodeList ) {
1212 dd . AddMessage ( CreateMessage ( msgNode , dd , doc ) ) ;
1313 }
1414 }
1515
1616 private static DDMessage CreateMessage ( XmlNode node , DataDictionary dd , XmlDocument doc ) {
1717 var ddMsg = new DDMessage (
18- node . Attributes [ "name" ] . Value ,
19- node . Attributes [ "msgtype" ] . Value ,
20- node . Attributes [ "msgcat" ] . Value ) ;
18+ node . Attributes ! [ "name" ] ! . Value ,
19+ node . Attributes [ "msgtype" ] ! . Value ,
20+ node . Attributes [ "msgcat" ] ! . Value ) ;
2121
2222 foreach ( XmlNode childNode in node . ChildNodes )
2323 ReadChildNode ( childNode , ddMsg , dd , doc ) ;
@@ -26,7 +26,7 @@ private static DDMessage CreateMessage(XmlNode node, DataDictionary dd, XmlDocum
2626 }
2727
2828 private static DDGroup CreateGroup ( XmlNode node , DataDictionary dd , XmlDocument doc ) {
29- var groupName = node . Attributes [ "name" ] . Value ;
29+ var groupName = node . Attributes ! [ "name" ] ! . Value ;
3030 var counterField = dd . LookupField ( groupName ) ;
3131
3232 if ( node . ChildNodes . Count < 1 )
@@ -44,20 +44,20 @@ private static DDGroup CreateGroup(XmlNode node, DataDictionary dd, XmlDocument
4444
4545 private static void ReadChildNode (
4646 XmlNode childNode , IElementSequence elSeq , DataDictionary dd , XmlDocument doc , bool overrideReq = false ) {
47- bool req = childNode . Attributes [ "required" ] ? . Value == "Y" && ! overrideReq ;
47+ bool req = childNode . Attributes ! [ "required" ] ? . Value == "Y" && ! overrideReq ;
4848
4949 switch ( childNode . Name . ToLowerInvariant ( ) ) {
5050 case "field" :
51- elSeq . AddElement ( dd . LookupField ( childNode . Attributes [ "name" ] . Value ) , req ) ;
51+ elSeq . AddElement ( dd . LookupField ( childNode . Attributes [ "name" ] ! . Value ) , req ) ;
5252 break ;
5353
5454 case "group" :
5555 elSeq . AddElement ( CreateGroup ( childNode , dd , doc ) , req ) ;
5656 break ;
5757
5858 case "component" :
59- var componentName = childNode . Attributes [ "name" ] . Value ;
60- XmlNode compNode = doc . SelectSingleNode ( $ "//components/component[@name='{ componentName } ']") ;
59+ var componentName = childNode . Attributes [ "name" ] ! . Value ;
60+ XmlNode compNode = doc . SelectSingleNode ( $ "//components/component[@name='{ componentName } ']") ! ;
6161
6262 if ( compNode == null )
6363 throw new ParsingException ( $ "Can't find component: { componentName } ") ;
0 commit comments