About the Author |
|
xi | |
Introduction |
|
xiii | |
|
|
1 | (38) |
|
Chapter 1 The SOLID Design Principles |
|
|
3 | (24) |
|
Single Responsibility Principle |
|
|
3 | (3) |
|
|
6 | (8) |
|
Liskov Substitution Principle |
|
|
14 | (3) |
|
Interface Segregation Principle |
|
|
17 | (5) |
|
Dependency Inversion Principle |
|
|
22 | (5) |
|
Chapter 2 The Functional Perspective |
|
|
27 | (12) |
|
|
27 | (3) |
|
Functional Literals in C# |
|
|
30 | (1) |
|
|
30 | (3) |
|
Functional Literals in F# |
|
|
33 | (2) |
|
|
35 | (1) |
|
Functional-Related Language Features |
|
|
36 | (3) |
|
Part II Creational Patterns |
|
|
39 | (64) |
|
|
41 | (22) |
|
|
41 | (3) |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
46 | (2) |
|
|
48 | (4) |
|
|
52 | (3) |
|
Fluent Interface Inheritance |
|
|
55 | (4) |
|
|
59 | (2) |
|
|
61 | (2) |
|
|
63 | (14) |
|
|
63 | (2) |
|
|
65 | (2) |
|
|
67 | (1) |
|
|
67 | (2) |
|
|
69 | (1) |
|
|
69 | (3) |
|
|
72 | (2) |
|
|
74 | (3) |
|
|
77 | (14) |
|
|
77 | (1) |
|
|
78 | (2) |
|
Deep Copying with a Special Interface |
|
|
80 | (1) |
|
|
81 | (2) |
|
Duplication via Copy Construction |
|
|
83 | (1) |
|
|
84 | (2) |
|
|
86 | (2) |
|
|
88 | (3) |
|
|
91 | (12) |
|
|
92 | (1) |
|
|
93 | (2) |
|
|
94 | (1) |
|
The Trouble with Singleton |
|
|
95 | (5) |
|
Singletons and Inversion of Control |
|
|
100 | (1) |
|
|
101 | (1) |
|
|
102 | (1) |
|
Part III Structural Patterns |
|
|
103 | (88) |
|
|
105 | (16) |
|
|
105 | (2) |
|
|
107 | (2) |
|
|
109 | (4) |
|
|
113 | (3) |
|
Property Adapter (Surrogate) |
|
|
116 | (2) |
|
Adapters in the .NET Framework |
|
|
118 | (1) |
|
|
119 | (2) |
|
|
121 | (10) |
|
|
121 | (4) |
|
Dynamic Prototyping Bridge |
|
|
125 | (4) |
|
|
129 | (2) |
|
|
131 | (10) |
|
|
131 | (3) |
|
|
134 | (4) |
|
Shrink Wrapping the Composite |
|
|
138 | (2) |
|
|
140 | (1) |
|
|
141 | (18) |
|
|
141 | (3) |
|
|
144 | (1) |
|
|
145 | (4) |
|
Dynamic Decorator Composition |
|
|
149 | (4) |
|
|
153 | (2) |
|
|
155 | (1) |
|
|
156 | (3) |
|
|
159 | (10) |
|
Building a Trading Terminal |
|
|
161 | (1) |
|
|
162 | (3) |
|
|
165 | (2) |
|
|
167 | (2) |
|
|
169 | (8) |
|
|
169 | (3) |
|
|
172 | (4) |
|
|
176 | (1) |
|
|
177 | (14) |
|
|
177 | (3) |
|
|
180 | (3) |
|
|
183 | (3) |
|
|
186 | (3) |
|
|
189 | (2) |
|
Part IV Behavioral Patterns |
|
|
191 | (160) |
|
Chapter 14 Chain of Responsibility |
|
|
193 | (12) |
|
|
193 | (1) |
|
|
194 | (4) |
|
|
198 | (5) |
|
|
203 | (2) |
|
|
205 | (16) |
|
|
205 | (1) |
|
Implementing the Command Pattern |
|
|
206 | (2) |
|
|
208 | (4) |
|
|
212 | (4) |
|
|
216 | (2) |
|
Queries and Command Query Separation |
|
|
218 | (1) |
|
|
219 | (2) |
|
|
221 | (16) |
|
Numeric Expression Evaluator |
|
|
222 | (8) |
|
|
223 | (3) |
|
|
226 | (4) |
|
|
230 | (1) |
|
Interpretation in the Functional Paradigm |
|
|
230 | (5) |
|
|
235 | (2) |
|
|
237 | (12) |
|
|
238 | (3) |
|
|
241 | (4) |
|
|
245 | (2) |
|
|
247 | (2) |
|
|
249 | (12) |
|
|
249 | (5) |
|
|
254 | (5) |
|
|
259 | (2) |
|
|
261 | (8) |
|
|
261 | (2) |
|
|
263 | (4) |
|
|
267 | (2) |
|
|
269 | (10) |
|
|
269 | (2) |
|
|
271 | (1) |
|
|
271 | (1) |
|
|
272 | (1) |
|
Null Object Virtual Proxy |
|
|
273 | (1) |
|
|
274 | (2) |
|
|
276 | (3) |
|
|
279 | (22) |
|
|
281 | (3) |
|
|
284 | (2) |
|
|
286 | (6) |
|
|
292 | (5) |
|
|
297 | (1) |
|
Declarative Subscriptions |
|
|
298 | (2) |
|
|
300 | (1) |
|
|
301 | (14) |
|
State-Driven State Transitions |
|
|
302 | (3) |
|
|
305 | (4) |
|
State Machines with Stateless |
|
|
309 | (5) |
|
Types, Actions, and Ignoring Transitions |
|
|
309 | (2) |
|
|
311 | (1) |
|
|
312 | (1) |
|
|
312 | (2) |
|
|
314 | (1) |
|
|
315 | (8) |
|
|
316 | (3) |
|
|
319 | (2) |
|
|
321 | (1) |
|
|
322 | (1) |
|
Chapter 24 Template Method |
|
|
323 | (6) |
|
|
323 | (3) |
|
Functional Template Method |
|
|
326 | (2) |
|
|
328 | (1) |
|
|
329 | (22) |
|
|
330 | (2) |
|
|
332 | (3) |
|
Functional Reflective Visitor |
|
|
334 | (1) |
|
|
335 | (1) |
|
|
336 | (2) |
|
|
338 | (2) |
|
|
340 | (5) |
|
Implementing an Additional Visitor |
|
|
343 | (2) |
|
|
345 | (3) |
|
|
348 | (1) |
|
|
349 | (2) |
Index |
|
351 | |