I have a class library that I created, which consists of several classes that inherit from one base class.
There is a virtual method defined in the base class Process, which will essentially process the contents of the class structure in the application.
There is an exchange of messages between the various components (servers) of the application, and they send and receive messages such as the base class, and then call Process ()
Where am I stuck in that I need to override the Process () method in other parts of the application, that is, in different assemblies, without deriving a different type from it.
From what I read, this seems impossible, so looking if using interfaces solves the problem?
EDIT:
What I did not mention in the question is that each derived class of the base class must have a different implementation of Process () depending on the functionality required by this class.
For example:
class First : BaseClass
{
override void Process()
{
}
}
class Second : BaseClass
{
override void Process()
{
}
}
the code in the methods of the redefinition process must be in different assemblies due to the fact that this code will refer to other external sources based on the class to which it belongs, I do not want to be distributed throughout the application.
For clarification only, I have access and, if necessary, you can change the library class.
I am doing some extra reading, and it would seem that using delegates can solve this problem .. thoughts?