Using Dynamo library functions in .Net WPF application

Without breaking the software license, you cannot. Well at least for Revit - I cannot speak for Civil 3D. Headless Revit is not permitted, and I have only seen/heard rumors of it in three situations, two of which are internal to Autodesk. As I am not a Civil 3D expert I won’t speak to those options just yet, but I will note there is a very recent topic on bulk processing that likely will interest you. I believe this will require opening an instance of Civil 3D though. I can speak more to Revit though.

As a first alternative look into Dynamo Multi-Player by Bird Tools. It is free, and while it does require opening Revit first you can then run the Dynamo graph or graphs across a selection of models that are both locally hosted or cloud hosted.

As a second alternative, look into moving from Dynamo to an Autodesk Platform Services tool, which can be automated enough that users won’t even need to run an application; just post a file and it will run through.

As a final alternative, you can look into bulk processing via journal playback. This requires a custom built journal which opens a Revit session, opens a model, executes the graph, synch’s the model, and closes Revit. That journal can be further configured to open a sequence of models and perform the actions on each before closing Revit; this is as close to what you asked which you can get without moving to Autodesk Platform Services and cloud processing the models, but users will see Revit show up and actions taken.

In the future I am confident that you will eventually be able to run your Dynamo graphs on your models via a cloud service, but that is far enough out that you should not let it sway your decision today.