05 2017 档案

摘要:namespace MultipleMementoPattern { // 联系人 public class ContactPerson { public string Name { get; set; } public string MobileNum { get; set; } } // 发起人 public ... 阅读全文
posted @ 2017-05-31 16:13 小小高 阅读(210) 评论(0) 推荐(0) 编辑
摘要:namespace VistorPattern { // 抽象元素角色 public abstract class Element { public abstract void Accept(IVistor vistor); public abstract void Print(); } // 具体元素A publ... 阅读全文
posted @ 2017-05-31 16:11 小小高 阅读(158) 评论(0) 推荐(0) 编辑
摘要:namespace ChainofResponsibility { // 采购请求 public class PurchaseRequest { // 金额 public double Amount { get; set; } // 产品名字 public string ProductName { get;... 阅读全文
posted @ 2017-05-31 16:10 小小高 阅读(175) 评论(0) 推荐(0) 编辑
摘要:powershell命令行找System.Management.Automation.dll命令 : [psobject].Assembly.Location powershell命令行找System.Management.Automation.dll命令 : [psobject].Assembly 阅读全文
posted @ 2017-05-19 15:04 小小高 阅读(3205) 评论(0) 推荐(1) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace setIp { public class Command { /**/ /// /// ... 阅读全文
posted @ 2017-05-19 14:25 小小高 阅读(566) 评论(0) 推荐(1) 编辑
摘要:新建build.cake文件: 在powershell中执形:build.ps1 会 build当前解决方案下的所有项目 更多用法参考: http://cakebuild.net/ 阅读全文
posted @ 2017-05-19 12:11 小小高 阅读(1172) 评论(0) 推荐(0) 编辑
摘要:测试类: 阅读全文
posted @ 2017-05-18 12:05 小小高 阅读(209) 评论(0) 推荐(0) 编辑
摘要:// 客户端调用 class Client { static void Main(string[] args) { // 创建一个菠菜实例并调用模板方法 Spinach spinach = new Spinach(); spinach.CookVegetabel(); ... 阅读全文
posted @ 2017-05-17 18:33 小小高 阅读(138) 评论(0) 推荐(0) 编辑
摘要:// 客户端调用 class Client { static void Main(string[] args) { // 创建一个代理对象并发出请求 Person proxy = new Friend(); proxy.BuyProduct(); Con... 阅读全文
posted @ 2017-05-17 18:33 小小高 阅读(122) 评论(0) 推荐(0) 编辑
摘要:// 教官,负责调用命令对象执行请求 public class Invoke { public Command _command; public Invoke(Command command) { this._command = command; } public void... 阅读全文
posted @ 2017-05-17 18:31 小小高 阅读(90) 评论(0) 推荐(0) 编辑
摘要:代码中存在多个if-else语句的情况下,此时可以考虑使用责任链模式来对代码进行重构。 阅读全文
posted @ 2017-05-17 18:24 小小高 阅读(143) 评论(0) 推荐(0) 编辑
摘要:用来替换if else 阅读全文
posted @ 2017-05-17 17:34 小小高 阅读(147) 评论(0) 推荐(0) 编辑
摘要:Isnull(null,1); 返回 1 isnull(1,3);返回 3 阅读全文
posted @ 2017-05-17 15:47 小小高 阅读(1917) 评论(0) 推荐(0) 编辑
摘要:namespace StatePatternSample { public class Account { public State State {get;set;} public string Owner { get; set; } public Account(string owner) { ... 阅读全文
posted @ 2017-05-15 17:34 小小高 阅读(160) 评论(0) 推荐(0) 编辑
摘要:function domChange(domId, callback) { // select the target node var target = document.getElementById(domId); // create an observer instance var observ... 阅读全文
posted @ 2017-05-11 18:28 小小高 阅读(900) 评论(0) 推荐(0) 编辑
摘要:namespace MediatorPattern { // 抽象牌友类 public abstract class AbstractCardPartner { public int MoneyCount { get; set; } public AbstractCardPartner() { Mo... 阅读全文
posted @ 2017-05-08 13:29 小小高 阅读(188) 评论(0) 推荐(0) 编辑
摘要:namespace ObserverInNET { class Program { // 委托充当订阅者接口类 public delegate void NotifyEventHandler(object sender); // 抽象订阅号类 public class TenXun { ... 阅读全文
posted @ 2017-05-08 13:18 小小高 阅读(268) 评论(0) 推荐(0) 编辑
摘要:// 抽象聚合类 public interface IListCollection { Iterator GetIterator(); } // 迭代器抽象类 public interface Iterator { bool MoveNext(); Object GetCurrent(); ... 阅读全文
posted @ 2017-05-08 13:05 小小高 阅读(118) 评论(0) 推荐(0) 编辑
摘要:js 阅读全文
posted @ 2017-05-05 17:07 小小高 阅读(312) 评论(0) 推荐(0) 编辑
摘要:问题如图, 解决方法如下: 阅读全文
posted @ 2017-05-03 16:59 小小高 阅读(505) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示