GetEdge through C# script

I am trying to create a component that can select edges on revit, basically the as same when you right-click on the “Edge” component and choose Set Multiple Edges.
I tried to use the code from the plugin code (line 88) but, as expected, it doesnt work

Starting from Line 88: (3.9 KB)