摘要: 时刻提醒自己是否这个类或者方法符合SRP,我们需不需要把其分成小份的?single responsibility principle states that every class should have a single responsibility, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility.View Code 1 using System; 2 usin. 阅读全文
posted @ 2013-05-08 15:28 若愚Shawn 阅读(599) 评论(0) 推荐(0) 编辑
摘要: interface实现polymophersonView Code 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using TryCollection.Abstract; 6 7 namespace TryCollection 8 { 9 class Engine10 {11 private IState _state;12 public IState State13 {14 ... 阅读全文
posted @ 2013-05-08 10:08 若愚Shawn 阅读(204) 评论(0) 推荐(0) 编辑