I'm trying to filter a list based on a predicate Func. I use funk to filter the entire list and return the result of the operation. Then I need to decide which machine actions appear in the full list, but not filtered lists.
Fixed zero main (string [] arg) {var allActions = new list & lt; MachineAction & gt; {New machine action {name = "A", position = machineActionStatus.conlicated}, new machine action {name = "b", position = machineactionstats.error}, new machine action {name = "c", position = machineactionstats. Waiting}}; Var filtered actions = All actions. Where (FilterNotCompleted); } Private Readonly Static Fun & lt; MachineAction, bool & gt; FilterNotCompleted = action = & gt; (Verb. Position == machineActionStatus.Waiting || action status == MachineActionStatus.started); Public class machine action {public machine action status status {receipt; Internal set; } Public string name {get; Internal set; }} Internal Enum MachineActionStatus {wait, start, success, error, cancellation}; Is there an extension method that will compare the entire list to the filtered list and will not return them both?
Thanks
Take a look at the detail
Comments
Post a Comment