I have written a blog post about this topic in the past named Developing an CLR assembly with PI SDK. I remember that I tried to do a similar project with PI AF SDK but I was only successful with PI SDK.
Although this CLR assembly works, I recommend you to find another solution that uses PI AF SDK instead since all the new features are currently being added and will be added to this library only. We don't expect to have major enhancements in PI SDK.
Hope it helps!