Design Patterns — Digitteck Blog — Digitteck
Tag

Design Patterns

11 articles

Value Object
dotnet

Value Object

Building a generic ValueObject<T> base class in C# — implementing IComparable, IEquatable, operator overloads, and an implicit conversion operator to eliminate primitive obsession.

2019-03-20·4 min read
C# Wrapping Hierarchy
dotnet

C# Wrapping Hierarchy

Mirroring a third-party class hierarchy in your own wrapper layer using a generic IWrapper<T> interface implemented twice — preserving the parent–child relationship for typed collections.

2019-02-15·2 min read
ASP.NET — Controller Action to Controller Command Class
dotnet

ASP.NET — Controller Action to Controller Command Class

Extracting controller action logic into a dedicated command class that inherits Controller — giving it full access to HttpContext, View(), and routing without a wrapper property.

2019-01-10·3 min read
Class Attributes
dotnet

Class Attributes

Using custom C# attributes and reflection to tag filter classes with their data type category — eliminating duplicate definitions and enabling a self-registering dictionary pattern.

2018-10-04·4 min read
Factory Design Pattern
dotnet

Factory Design Pattern

The factory pattern decouples object creation from consumers using a factory method interface — adding new types requires only a new class, not edits to existing switch statements.

2018-07-08·4 min read
Revit External Event
revit-api-dot-net

Revit External Event

Wrapping ExternalEvent and Transaction in a custom IRevitActionHandler interface that works in both a live Revit add-in and a plain WPF test project without Revit context.

2018-07-01·5 min read
Bridge Design Pattern
dotnet

Bridge Design Pattern

The bridge pattern decouples abstraction from implementation so both can vary independently — illustrated with shapes holding color references instead of inheriting them.

2018-06-17·3 min read
Memento Design Pattern
dotnet

Memento Design Pattern

The memento pattern captures an object's state for later restoration using three actors: Originator, Memento, and Caretaker — the foundation of undo/redo.

2018-06-03·3 min read
Adapter Design Pattern
dotnet

Adapter Design Pattern

The adapter pattern bridges incompatible interfaces by wrapping an adaptee in a class that implements the target interface — illustrated with an old gas-car adapted to an electric-car interface.

2018-05-23·3 min read
digitteck

© 2026 Digitteck