c# – What design pattern would I be using for multiple DLLs using the same data but processing it with different classes

I’m re-writing my software from scratch and instead of hardcoding the processing libraries I decided to take a look at dynamic interfaces. But even the examples I found were not explicit in what I wanted to do. I’d like to write the management thread processes once then load each of the libraries on a thread dynamically using the same method calls in each of the libraries. That way I wouldn’t have to duplicate code. I was thinking of using Generic but that doesn’t appear to be compatible with dynamic interfaces.

How it’s used…

I have a set of data that I pull from a DB. I need to push that data to different systems using different processes, but the same method names.

So I would have common methods between methods, two of which would look like this:
InitializeConnector();
ProcessData(MyDataType incomingdata);

So in practical usage (prototyped):

REST Service 1 data processing

public class RestService1
{
    public bool InitializeConnector()
    {
        do stuff here...
    }

    public bool ProcessData( MyDataType incomingDataType)
    {
        ... process data here
    }

 }

REST Service 2 data processing (not all connection services are REST but this is the example)

public class RestService2
{
    public bool InitializeConnector()
    {
        do stuff here...
    }

    public bool ProcessData( MyDataType incomingDataType)
    {
        ... process data here
    }

 }

Master thread class:

foreach (data in dataList)
{
     if (data.type == dataType.rest1)
         dynamicClass.ProcessData(data);
     ....

     // or better yet something like this
     dataType.rest1.ProcessData(data);
     ...             
}

Am I better off hard coding the implementation or is there a dynamic implementation that can be used?

I will be spinning up multiple threads to process the data. So each of these processes would be running on it’s own thread and I’ll have a master thread to “Schedule” the processing in each of the threads.

The whole idea is to drop in new processing DLLs to link to other systems, but all using the same calls and the same.