摘要: Decorator in Dependency Injection public interface IReportServer { void PrintReport(); } public class ReportService : IReportServer { public void Prin 阅读全文
posted @ 2022-05-19 16:44 后跳 阅读(35) 评论(0) 推荐(0)
摘要: 静态装饰组合Static Decorator Compsition public abstract class Shape { public abstract string AsString(); } public class Circel : Shape { float ridus; public 阅读全文
posted @ 2022-05-19 16:15 后跳 阅读(29) 评论(0) 推荐(0)
摘要: 装饰者模式 检查装饰器循环 过度设计 较复杂。 public abstract class Shape { public virtual string AsString() => string.Empty; } class Circel : Shape { float ridus; public C 阅读全文
posted @ 2022-05-19 15:18 后跳 阅读(33) 评论(0) 推荐(0)