when sending or receiving a '<L[0]>', `Item.Count` will throw an exception
fuquankim opened this issue · 1 comments
fuquankim commented
Describe the bug
when sending or receiving a '<L[0]>', Item.Count
will throw an exception
To Reproduce
Steps to reproduce the behavior:
- For example, send a S1F13 CR as
S1F13_EstablishComm: S1F13 W
<L[0]
>
.
- in
SmlExtension.ParseItem
, Since<L[0]>
is a none List, the method L() is called. - in
SmlExtension.Write
, when executing the statementwriter.Write(item.Count);
, theitem.Count
will throw an exception :"system.entrypointnotfoundexception"
Desktop (please complete the following information):
- OS: Windows 10 1909, 18363.900
Additional context
In item.Count
, I add the following comparison to determine whether the _values is an empty item.
if(_values == Enumerable.Empty<Item>())
{
return 0;
}
and then it works fine.
I have started to learn .net core since the last week, and I am wondering whether there is a better solution.