Hi,
Does the class QActionTable, which implements IEnumerable, support LINQ functions? I get errors like the following when trying to use them and wondering if I’m doing something wrong:
System.InvalidCastException: Object must implement IConvertible. at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType) at Skyline.DataMiner.Scripting.QActionTableEnumerator`1.get_Current() at Skyline.DataMiner.Net.Helper.EnumerableExtensions.ForEach[T](IEnumerable`1 value, Action`1 action) ... at QAction.Run(SLProtocolExt protocol)
EDIT: Example code, where streamusage is a table:
protocol.streamusage.ForEach(su => protocol.Log($”QA{protocol.QActionID}|Test|{su}”, LogType.DebugInfo, LogLevel.NoLogging));
Robin Becker [DevOps Advocate] Selected answer as best 23rd November 2023
Jorge see edit.
Hi Robin, this currently is not supported due to an issue in the QActionTable class of the helper code. We have a task in our backlog to fix this 185850.
Robin Becker [DevOps Advocate] Posted new comment 23rd November 2023
Thanks for the answer. Consider this a +1 vote for that task. I find it much cleaner and simpler than going the DMS route.
Hi Robin, can you please add the code that you are trying to execute?