你的位置: 码友网首页 / 资讯源列表 / Design patterns in C# - The Proxy Pattern

关于[Design patterns in C# - The Proxy Pattern]的摘要:

Continuing my series on design patterns, this week we're focusing on the proxy pattern! The proxy pattern is used to provide access to an object. It is often used to enable this access over some distance - this could be providing remote access, or adding an extra level of protection around the object. The crucial thing is that the proxy pattern offers a way to indirectly provide (and control) access. It is similar in implementation to the decorator pattern, but its purpose is different. Both patterns wrap an inner object, however the decorator pattern expands on the functionality of the inner object, where the proxy pattern instead governs the access to the object.

原文地址: https://endjin.com/blog/2020/12/design-patterns-in-csharp-the-proxy-pattern.html

收录时间: 2020-12-09 浏览量: 1972 分类: 设计模式

| 0 收藏 | 0