Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdaptiveCode

Code samples to accompany the book Adaptive Code Via C#, Korean Edition

##부록 B##

이 책에서 제공하는 예제 소스 코드는 Visual Studio 2013을 이용하여 작성했습니다. 예제 코드 중 일부는 직접 실행이 되지 않는 코드이지만 모든 코드는 다운로드 및 컴파일이 가능합니다.

이 책의 모든 예제 코드는 이 책의 부록 A에서 언급했듯이 처음에는 각각의 브랜치로 별도로 관리되었지만 현재는 원 저자가 master 브랜치에 각 장별로 모두 모아두었습니다. 원 저자의 저장소는 읽기 전용이지만 지금 이 코드 저장소처럼 fork를 이용해 각자 자신만의 저장소를 만들어 필요하다면 코드를 수정하여 GitHub에 다시 업로드할 수도 있습니다. 각 장의 예제 번호 및 관련 소스 코드의 위치는 아래 표를 참고하시기 바랍니다.

제1장, 제6장, 그리고 제10장은 소스 코드가 사용되지 않았으므로 아래 목록에 표기되어 있지 않습니다.

제2장

예제 코드 번호 소스 코드 경로
예제 2-2 ch2-simple-dependency
예제 2-14 ~ 2-16 ch2-service-discovery
예제 2-17, 2-18 ch2-restful-service

제3장

예제 코드 번호 소스 코드 경로
예제 3-1 ~ 3-7, 3-9, 3-10 ch3-interface-definition
예제 3-11, 3-13, 3-14 ch3-null-object-pattern
예제 3-15, 3-16 ch3-null-object-pattern-isnull-anti-pattern
예제 3-17 ch3-null-object-isnull-obsolescene
예제 3-18, 3-19 ch3-adapter-pattern
예제 3-21 ch3-duck-typing
예제 3-22 ch3-duck-typing-using-dlr
예제 3-23 ch3-duck-typing-using-impromptu-interface
예제 3-24, 3-25 ch3-clr-duck-typing-support
예제 3-26 ~ 3-28 ch3-mixins-using-extension-methods
예제 3-29 ~ 3-32 ch3-mixins-using-remotion-remix
예제 3-33, 3-34 ch3-fluent-interface

제4장

예제 코드 번호 소스 코드 경로
예제 4-1 ch4-arrange-the-preconditions
예제 4-2 ch4-perform-the-testable-act
예제 4-3, 4-4 ch4-assert-the-expectations
예제 4-5 ch4-tdd-initial-implementation
예제 4-6 ch4-tdd-opening-balance-unit-test
예제 4-7, 4-8 ch4-tdd-second-implementation-of-addtransaction-test
예제 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-16 ch4-mocking-with-fakes
예제 4-17 ch4-mocking-with-stubs
예제 4-19, 4-20 ch4-testing-account-service-constructor
예제 4-21, 4-22 ch4-testing-account-not-found
예제 4-23, 4-24 ch4-testing-account-method-throws
예제 4-25, 4-26 ch4-testing-to-fix-bugs
예제 4-27 ch4-adding-setup-method
예제 4-28 ch4-refactoring-base
예제 4-29 ch4-refactoring-replace-magic-numbers-with-constants
예제 4-30, 4-31 ch4-refactoring-creating-account-type-subclasses
예제 4-32 ~ 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-44 ch4-refactoring-replace-inheritance-with-delegation

제5장

예제 코드 번호 소스 코드 경로
예제 5-13 ch5-decorator-pattern
예제 5-14, 5-15 ch5-composite-pattern
예제 5-16, 5-17 ch5-predicate-decorator
예제 5-18 ch5-predicate-decorator-first-refactor
예제 5-19 ch5-predicate-decorator-second-refactor
예제 5-20 ch5-predicate-decorator-branching-refactor
예제 5-21, 5-22 ch5-lazy-decorator
예제 5-23, 5-24 ch5-logging-decorator
예제 5-25 ch5-profiling-decorator
예제 5-26 ch5-profiling-decorator-added-stopwatch
예제 5-27 ch5-predicate-decorator-first-refactor
예제 5-28 ~ 5-30 ch5-predicate-decorator-second-refactor
예제 5-31 ch5-async-decorator
예제 5-32 ch5-async-decorator-first-refactor
예제 5-33, 5-34 ch5-decorating-properties-and-events
예제 5-35, 5-36 ch5-strategy-pattern-instead-of-switch

제7장

예제 코드 번호 소스 코드 경로
예제 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, 7-6 ch7-contracts-simple-data-invariants
예제 7-7, 7-8 ch7-contracts-lsp-pre-conditions
예제 7-9 ch7-contracts-lsp-pre-conditions-are-inherited
예제 7-10, 7-11 ch7-contracts-lsp-post-conditions
예제 7-12 ~ 7-14 ch7-contracts-lsp-protected-invariants
예제 7-15, 7-16 ch7-code-contracts-pre-conditions
예제 7-17 ch7-code-contracts-post-conditions
예제 7-18 ch7-code-contracts-invariants
예제 7-19 ~ 7-21 ch7-lsp-subtype-covariance
예제 7-22 ch7-lsp-generic-covariance
예제 7-23, 7-24 ch7-lsp-generic-contravariance
예제 7-25 ch7-lsp-invariance

제8장

예제 코드 번호 소스 코드 경로
예제 8-1, 8-2 ch8-simple-crud-interface
예제 8-3 ~ 8-6 ch8-crud-interface-delete-confirmation-decorator
예제 8-7 ~ 8-9 ch8-crud-interface-read-caching
예제 8-10, 8-11 ch8-crud-interface-modification-auditing
예제 8-12 ~ 8-13 ch8-crud-interface-modification-event-publishing
예제 8-14 ~ 8-20 ch8-isp-client-injection
예제 8-21 ~ 8-27 ch8-splitting-interfaces-client
예제 8-28 ch8-splitting-interfaces-inheritance
예제 8-29 ch8-splitting-interfaces-read-write
예제 8-30, 8-31 ch8-splitting-interfaces-authorization
예제 8-32, 8-33 ch8-splitting-interfaces-architecture
예제 8-34 ~ 8-36 ch8-splitting-interfaces-asymmetric
예제 8-37 ~ 8-40 ch8-single-method-interfaces

제9장

예제 코드 번호 소스 코드 경로
예제 9-1 ~ 9-4 ch9-dependency-inject-base-wpf
예제 9-5 ch9-method-injection
예제 9-6 ch9-property-injection
예제 9-7 ch9-ioc-container
예제 9-8 ~ 9-10 ch9-ioc-container-rrr
예제 9-11, 9-12 ch9-ioc-container-declarative-xml
예제 9-13 ch9-inject-connection
예제 9-14 ch9-service-implements-idisposable
예제 9-15, 9-16 ch9-service-requires-connection-factory
예제 9-17 ch9-responsible-owner-pattern
예제 9-18 ~ 9-21 ch9-service-locator-anti-pattern
예제 9-22 ch9-illegitimate-injection
예제 9-23 ~ 9-27 ch9-ioc-composition-roots
예제 9-28 ch9-ioc-conventions
예제 9-29 ch9-ioc-advanced-convention

제11장

예제 코드 번호 소스 코드 경로
예제 11-1 ~ 11-8 sample-sprint1-create-rooms
예제 11-9 ~ 11-11 sample-sprint1-list-rooms
예제 11-12, 11-13 sample-sprint1-view-room-messages
예제 11-14, 11-15 sample-sprint1-add-room-messages

제12장

예제 코드 번호 소스 코드 경로
예제 12-1, 12-2 sample-sprint2-markdown
예제 12-3, 12-4 sample-sprint2-filter-content
예제 12-5 sample-sprint2-document-storage

About

Code samples to accompany the book Adaptive Code Via C# - Korean Edition.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages