Skip to content

Instantly share code, notes, and snippets.

@OnesimusUnbound
Last active December 19, 2015 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OnesimusUnbound/5999796 to your computer and use it in GitHub Desktop.
Save OnesimusUnbound/5999796 to your computer and use it in GitHub Desktop.
List of .Net classes that use design patterns

NOTE

Items here are still in progress and I haven't determined with 100% certainty that the content is true. Please verify the content. ;-)

Creational

  • Abstract factory

    • System.Data.Common.DbProviderFactory
  • Builder

    • System.Text.StringBuilder
  • Factory method

    • static method Create of System.Net.WebRequest
    • System.Net.WebRequest
    • System.Convert
  • Prototype

  • Singleton

  • Object pool

    • System.Threading.ThreadPool

Structural

  • Adapter

  • Bridge

    • System.Data.Common.DataAdapter (NOTE: Not 100% sure on this, though I think bridge is a perfect pattern here)
  • Composite

    • System.Web.UI.Control + System.Web.UI.ControlCollection
  • Decorator

    • derivatives of System.IO.Stream
  • Facade

  • Flyweight

  • Proxy

    • Class generated from web services

Behavioral

  • Chain of responsibility
  • Command
  • Interpreter
  • Iterator
    • derivatives of System.IEnumerator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
    • classes that implements System.IComparer. Used in some methods in System.Array
  • Template method
  • Visitor
    • System.Linq.Expressions.ExpressionVisitor + System.Linq.Expressions.Expression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment