c# - 2 Product lines sharing same code -
After We are working on two product lines that will share the same code. For different functionality, I have applied the same interface to both product lines (in some case or base class) and these types of main classes (which are different for both product lines) Will be passed and forward downstream For deep code inside business logic, it is very difficult to be product line-specific code we do not want to do for the user (Productline == "ProductLine1") and the rest of the operating system. Then I'm planning to apply for a factory class which will have static methods NewObject1 (), NewObject2 (go back) and prompt. . This factory will be registered in the main category in the form of Factory.RegisterClient (ProductLine1) With the above approach, then the factory (which internally includes ProductLine1Factor & ProductLine2Factory) make the types of objects Who knows for Do you know a better approach to this problem, please note that ProductLine1 already e...