0% found this document useful (0 votes)
63 views10 pages

Adaptive Code AppendixB

The document summarizes the code samples and Git branches referenced in the book. It provides tables that list the code sample numbers from each chapter along with the corresponding Git branch names hosted on the book's GitHub repository. The branches allow downloading and compiling related code examples. Some branches build upon previous examples to demonstrate concepts in a step-by-step fashion.

Uploaded by

Dennito
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views10 pages

Adaptive Code AppendixB

The document summarizes the code samples and Git branches referenced in the book. It provides tables that list the code sample numbers from each chapter along with the corresponding Git branch names hosted on the book's GitHub repository. The branches allow downloading and compiling related code examples. Some branches build upon previous examples to demonstrate concepts in a step-by-step fashion.

Uploaded by

Dennito
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Appendix B

GitHub code samples


The vast majority of the code samples in this book were taken from Microsoft Visual Studio 2013
solutions. Although not all of them are directly runnable, they can all be downloaded and compiled.

Each code sample relates to a Git branch that is hosted on this book’s repository on GitHub. Although
the repository is read-only, it can be forked so that you can make edits on your own copy and push
them back to GitHub.

Some of the examples naturally follow on from each other and, whenever applicable, I created a new
branch to preserve the prior example and build on it. The following tables show how the branches
relate to each other and which code listings relate to each branch, for ease of reference and to avoid
cluttering the main chapters’ content with constant references to Git branches. Because Chapters 1, 6,
and 10 do not include code, you won’t find listings and branches for those chapters below.
Appendix B GitHub code samples 2

Chapter 2 branches

Listing Number Branch Name


2-1
2-2
2-3
2-4
2-5
2-6
2-7
2-8
2-9
2-10
2-11
2-12
2-13
2-14
2-15 ch2-service-discovery
2-16
2-17
ch2-restful-service
2-18
2-19
2-20
2-21
2-22
2-23
2-24
2-25
2-26
Appendix B GitHub code samples 3

Chapter 3 branches

Listing Number Branch Name


3-1
3-2
3-3
3-4 ch3-interface-definition
3-5
3-6
3-7
3-8
3-9
ch3-interface-definition
3-10
3-11 ch3-null-object-pattern
3-12
3-13
ch3-null-object-pattern
3-14
3-15
ch3-null-object-pattern-isnull-anti-pattern
3-16
3-17 ch3-null-object-pattern-isnull-obsolescence
3-18
ch3-adapter-pattern
3-19
3-20
3-21 ch3-duck-typing
3-22 ch3-duck-typing-using-dlr
3-23 ch3-duck-typing-using-impromptu-interface
3-24
ch3-clr-duck-typing-support
3-25
3-26
3-27 ch3-mixins-using-extension-methods
3-28
3-29
3-30
ch3-mixins-using-remotion-remix
3-31
3-32
3-33
ch3-fluent-interface
3-34
Appendix B GitHub code samples 4

Chapter 4 branches

Listing Number Branch Name


4-1 ch4-arrange-the-preconditions
4-2 ch4-perform-the-testable-act
4-3
ch4-assert-the-expectations
4-4
4-5 ch4-tdd-initial-implementation
4-6 ch4-tdd-opening-balance-unit-test
4-7
ch4-tdd-second-implementation-of-addtransaction-test
4-8
4-9 ch4-tdd-correct-implementation-of-addtransaction
4-10 ch4-tdd-yet-another-unit-test
4-11 ch4-tdd-the-absolutely-final-and-correct-implementation-of-addtransaction-
honest
4-12 ch4-a-more-complex-unit-test
4-13
4-14
ch4-mocking-with-fakes
4-15
4-16
4-17 ch4-mocking-with-stubs
4-18
4-19
ch4-testing-account-service-constructor
4-20
4-21
ch4-testing-account-not-found
4-22
4-23
ch4-testing-account-method-throws
4-24
4-25
ch4-testing-to-fix-bugs
4-26
4-27
ch4-adding-setup-method
4-28
4-29 ch4-refactoring-base
4-30 ch4-refactoring-replace-magic-numbers-with-constants
4-31
4-32 ch4-refactoring-creating-account-type-subclasses
4-33
4-34
ch4-refacotring-replace-constructor-with-factory-method
4-35
4-36
ch4-replace-constructor-with-factory-class
4-37
4-38
ch4-new-account-type-reward
4-39
4-40
ch4-new-account-type-standard
4-41
4-42
4-43 ch4-refactoring-replace-inheritance-with-delegation
4-44
Appendix B GitHub code samples 5

Chapter 5 branches

Listing Number Branch Name


5-1
5-2
5-3
5-4
5-5
5-6
5-7
5-8
5-9
5-10
5-11
5-12
5-13 ch5-decorator-pattern
5-14
ch5-composite-pattern
5-15
5-16
ch5-predicate-decorator
5-17
5-18 ch5-predicate-decorator-first-refactor
5-19 ch5-predicate-decorator-second-refactor
5-20 ch5-predicate-decorator-branching-refactor
5-21
ch5-lazy-decorator
5-22
5-23
ch5-logging-decorator
5-24
5-25 ch5-profiling-decorator
5-26 ch5-profiling-decorator-added-stopwatch
5-27 ch5-predicate-decorator-first-refactor
5-28
5-29 ch5-predicate-decorator-second-refactor
5-30
5-31 ch5-async-decorator
5-32 ch5-async-decorator-first-refactor
5-33
ch5-decorating-properties-and-events
5-34
5-35
ch5-strategy-pattern-instead-of-switch
5-36
Appendix B GitHub code samples 6

Chapter 7 branches

Listing Number Branch Name


7-1 ch7-pre-conditions-calculate-shipping
7-2 ch7-pre-conditions-guard-clause-more-context
7-3 ch7-contracts-simple-pre-conditions
7-4 ch7-contracts-simple-post-conditions
7-5
ch7-contracts-simple-data-invariants
7-6
7-7
ch7-contracts-lsp-pre-conditions
7-8
7-9 ch7-contracts-lsp-pre-conditions-are-inherited
7-10
ch7-contracts-lsp-post-conditions
7-11
7-12
7-13 ch7-contracts-lsp-protected-invariants
7-14
7-15
ch7-code-contracts-pre-conditions
7-16
7-17 ch7-code-contracts-post-conditions
7-18 ch7-code-contracts-invariants
7-19
7-20 ch7-lsp-subtype-covariance
7-21
7-22 ch7-lsp-generic-covariance
7-23
ch7-lsp-generic-contravariance
7-24
7-25 ch7-lsp-invariance
7-26
7-27
7-28
7-29
Appendix B GitHub code samples 7

Chapter 8 branches

Listing Number Branch Name


8-1
ch8-simple-crud-interface
8-2
8-3
8-4
ch8-crud-interface-delete-confirmation-decorator
8-5
8-6
8-7
8-8 ch8-crud-interface-read-caching
8-9
8-10
ch8-crud-interface-modification-auditing
8-11
8-12
8-13 ch8-crud-interface-modification-event-publishing
8-14
8-15
8-16
8-17
ch8-isp-client-injection
8-18
8-19
8-20
8-21
8-22
8-23
8-24 ch8-splitting-interfaces-client
8-25
8-26
8-27
8-28 ch8-splitting-interfaces-inheritance
8-29 ch8-splitting-interfaces-read-write
8-30
ch8-splitting-interfaces-authorization
8-31
8-32
ch8-splitting-interfaces-architecture
8-33
8-34
8-35 ch8-splitting-interfaces-asymmetric
8-36
8-37
8-38
ch8-single-method-interfaces
8-39
8-40
Appendix B GitHub code samples 8

Chapter 9 branches

Listing Number Branch Name


9-1
9-2
ch9-dependency-inject-base-wpf
9-3
9-4
9-5 ch9-method-injection
9-6 ch9-property-injection
9-7 ch9-ioc-container
9-8
9-9 ch9-ioc-container-rrr
9-10
9-11
ch9-ioc-container-declarative-xml
9-12
9-13 ch9-inject-connection
9-14 ch9-service-implements-idisposable
9-15
ch9-service-requires-connection-factory
9-16
9-17 ch9-responsible-owner-pattern
9-18
9-19
ch9-service-locator-anti-pattern
9-20
9-21
9-22 ch9-illegitimate-injection
9-23
9-24
9-25 ch9-ioc-composition-roots
9-26
9-27
9-28 ch9-ioc-conventions
9-29 ch9-ioc-advanced-convention
Appendix B GitHub code samples 9

Chapter 11 branches

Listing Number Branch Name


11-1
11-2
11-3
11-4
sample-sprint1-create-rooms
11-5
11-6
11-7
11-8
11-9
11-10 sample-sprint1-list-rooms
11-11
11-12 sample-sprint1-view-room-messages
11-13
11-14 sample-sprint1-add-room-messages
11-15
Appendix B GitHub code samples 10

Chapter 12 branches

Listing Number Branch Name


12-1
sample-sprint2-markdown
12-2
12-3
sample-sprint2-filter-content
12-4
12-5 sample-sprint2-document-storage

You might also like