C# 3.0 Design Patterns

Only available on StudyMode
  • Topic: Design pattern, Software design patterns, Articles with example Java code
  • Pages : 367 (58758 words )
  • Download(s) : 72
  • Published : December 7, 2012
Open Document
Text Preview
www.dbebooks.com - Free Books & magazines

C# 3.0 Design Patterns

Other Microsoft .NET resources from O’Reilly
Related titles

.NET Books
Resource Center

C# 3.0 in a Nutshell
C# 3.0 Cookbook
Head First C#

Head First Design Patterns
Learning C# 2005
Programming C# 3.0

dotnet.oreilly.com is a complete catalog of O’Reilly’s books on .NET and related technologies, including sample chapters and code examples.
ONDotnet.com provides independent coverage of fundamental,
interoperable, and emerging Microsoft .NET programming and
web services technologies.

Conferences

O’Reilly & Associates bring diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in documenting the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the

trenches. Visit conferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online reference library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or simply flip to the page you need. Try it today for free.

C# 3.0 Design Patterns

Judith Bishop

Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo

C# 3.0 Design Patterns
by Judith Bishop
Copyright © 2008 Judith Bishop. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (safari.oreilly.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com.

Editor: John Osborn
Production Editor: Loranah Dimant
Copyeditor: Rachel Wheeler
Proofreader: Loranah Dimant

Indexer: John Bickelhaupt
Interior Designer: David Futato
Cover Illustrator: Karen Montgomery
Illustrator: Jessamyn Read

Printing History:
December 2007:

First Edition.

Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. C# 3.0 Design Patterns, the image of a greylag goose, and related trade dress are trademarks of O’Reilly Media, Inc.

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

This book uses RepKover™ a durable and flexible lay-flat binding. ,
ISBN 10: 0-596-52773-X
ISBN 13: 978-0-596-52773-0
[M]

In memory of my beloved father,
Tom Mullins (1920–2007).

Table of Contents

Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv 1. C# Meets Design Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 About Patterns

About UML
About C# 3.0
About the Examples

2
3
5
6

2. Structural Patterns: Decorator, Proxy, and Bridge . . . . . . . . . . . . . . . . . . . . . . . 8 Decorator Pattern
Proxy Pattern
Bridge Pattern
Example: OpenBook
Pattern Comparison

9
22
36
39
46

3. Structural Patterns: Composite and Flyweight . . . . . . . . . . . . . . . . . . . . . . . . . 49 Composite Pattern
Flyweight Pattern
Exercises...
tracking img