How to parse source as a variable for capture in C#

Hello , I was trying to make a C# checker, but I don’t know how to do (LR In open Bullet) in Coding to parse a variable for capture, I’m currently using Leaf.xNet Library

You can literally copy paste this function which is in the OB2 source code