I'm looking for a way to sort a list of Event Frames by unique ID. I have an app that can generate many EF per second (using a custom Event Frame Delivery Channel for PI Notification) and I use the trigger time as EF StartTime which does not include milliseconds. My objective is to preserve EF sequencing based on the UniqueID.
To my best knowledge,
- When using FindEventFramesByAttribute the resulting list is either sorted by StartTime or EndTime depending on method searchmode parameters
- When using the Sort method, the default implementation will sort the EFs by name.
AFNamedCollectionList<AFEventFrame> EventFrames = AFEventFrame.FindEventFramesByAttribute
Is there a way to use the Sort overload (and How?): Sort(IComparer<EventFrame>)
Any other idea?
N.B: This piece of code will be executed frequently... If I have to implement my own sorting algorithm, I feel it's going to explode processing time?
Alex @ M+W Automation