Home > Net >  C # programming module, execution order -- -- ask for help
C # programming module, execution order -- -- ask for help

Time:09-27

C # programming module, execution order - for help

Used to do a small project, suddenly found recently, most of the function modules of the project can be reuse (just in a different order),
So think of - whether can design function module automatic selection (order) and then press order execution (don't redistribute the EXE),
For example (can instantiate the basis of the function modules of F1 F2 F3, F4 F5 F6 F7 F8 F9 F10, project 1 F5 F4 F6 - order is F1 F2 F10, project 2 - order is F2 F4 F5 F5 F8 F10 F3 F5),
Trouble is now 1: - after the order is changed to instantiate selection module, 2: - how instantiation module in the main program calls in order 3: - how to debug each instantiation module alone,
BBS great god more - hope everybody a great god some directions article refers to the direction of the grateful to be grateful

CodePudding user response:

You this demand and plug-in development some similar, you can consult MEF

WPF a Prism open source framework is modular, you can use the code, the dynamic load module configuration file;

CodePudding user response:

Separate debugging as to what you say, I can understand into a unit test? Prism each module can be separate test

CodePudding user response:

refer to the second floor Eason0807 response:
separate debugging as to what you say, I can understand that unit testing is not? The Prism of each module can be a separate test


Thanks for the great god reply,

My demand is probably the

/* process is fixed, before 1 assumes that the execution is to press tool, tool 2, 3, tools 4, as demand will tools 1234 instantiation corresponding module, and then use,

But now, after the process variable into the, I don't know how to make the tool 1, 2 tools don't know how to instantiate the 3 tools 4,

Tried: tools 1 2 3 tools 4 instantiation tool module, all need to use which one to choose one of them, but the memory was too much, now don't know how to make */

Also a great god, please help analysis analysis of gratitude

CodePudding user response:

The factory pattern?
Try to understand, perhaps, you want your a module is a product

CodePudding user response:

Dynamic process control I have been also want to do, I do the interface is the user's own drag controls, and then press drag-and-drop controls after the inside of the sequential module, haven't finished,

CodePudding user response:

Using reflection should be able to solve your problem, research about it,
  •  Tags:  
  • C#
  • Related