© Vaskaran Sarcar 2018
V. SarcarDesign Patterns in C#https://doi.org/10.1007/978-1-4842-3640-6_6

6. Proxy Pattern

Vaskaran Sarcar1  
(1)
Whitefield, Bangalore, Karnataka, India
 

This chapter covers the Proxy pattern.

GoF Definition

Provide a surrogate or placeholder for another object to control access to it.

Concept

A proxy is basically a substitute for an intended object. When a client deals with a proxy object, it thinks that it is dealing with the actual object. You need to support this kind of design because dealing with an original object is not always possible. This is because of many factors such as security issues, for example. So, in this pattern, you may want to use a class that can perform as an interface to something else.

Real-Life Example ...

Get Design Patterns in C#: A Hands-on Guide with Real-World Examples now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.