代码改变世界

随笔档案-2013年03月

Unity Application 学习笔记1 --初识

2013-03-21 23:53 by Shawn.Cheng, 2126 阅读, 收藏,
摘要: 上一篇文章中间简要的写了一个 关于Autofac 东西。这两天看了一下关于Unity Application 的一些运用。类似上一篇,写了几个相同的例子。最开始时使用编码注入的方式。代码如下: 1 class Program 2 { 3 static void Main(string[] args) 4 { 5 Program p = new Program(); 6 //p.Test3(); 7 p.Test4(); 8 9 Console.Read();... 阅读全文

Autofac 学习笔记草书 1 --- 初识

2013-03-18 00:18 by Shawn.Cheng, 374 阅读, 收藏,
摘要: 接口ILog1 public interface ILog2 {3 void Create(string log, params object[] paramters);4 }实现类PrintLoger 1 public class PrintLoger:ILog 2 { 3 protected TextWriter TW{get;set;} 4 5 public PrintLoger(TextWriter tw) 6 { 7 this.TW=tw; 8 ... 阅读全文