strategy-pattern
vb.net implement strategy pattern with different interface
is it possible to implement strategy pattern with different parameters in VB.net? For example I have the following code:[详细]
2023-03-11 09:32 分类:问答Should the strategy pattern be stateless?
Must a class that is a \"gang of four\" strategy be completely stateless (ie no fields) or can it contain immutable state (ie final f开发者_如何学Cields)?A strategy class encapsulates an action, not a[详细]
2023-03-09 12:35 分类:问答How to implement usage of multiple strategies at runtime
I need to process a list of records returned from a service. However the processing algorithm for a record changes completely based on a certain field on the record.[详细]
2023-03-06 05:47 分类:问答Strategy vs. Bridge Patterns
I know this question\'s been asked before (e.g., What is the difference between the bridge pattern and the strategy pattern?).[详细]
2023-03-02 15:08 分类:问答class design for for a dynamic GetHash function
I have the requirement to calculate an internal hashcode of instances of several types (some types are derived from each other). Two aspect开发者_开发知识库s are dynamic here and can vary independentl[详细]
2023-02-20 03:10 分类:问答What's the difference between "Chain of responsibility" and "Strategy" patterns?
I\'m raising this question because of another question I asked here on SO some days ago. I had to solve an sp开发者_运维知识库ecific problem, and after two replies I got, I realized two patterns can h[详细]
2023-02-12 07:49 分类:问答Alternative Pattern to Strategy
I have a piece of code where I started to put the strategy pattern in place, say as follows: IStrategy[详细]
2023-02-12 07:04 分类:问答How to dynamically load strategies (Strategy Pattern)?
My application will have different strategies for my objects. What is the best way to implement that? Ideally, I would like to dynamically load the strategy implementations from, say, some relational[详细]
2023-02-12 05:03 分类:问答Strategy Pattern- Correct Implementation
I\'m using this pattern for the first time, and using C#. I just wanted to check that this is the correct implementation.[详细]
2023-02-10 14:37 分类:问答Better alternative to Strategy pattern in Scala?
When I\'m programming in Java (or a similar language), I often employ a simple version of the Strategy pattern, using interfaces and implementation classes, to provide runtime-selectable implementatio[详细]
2023-02-10 02:36 分类:问答