1namespace Microsoft.Practices.ObjectBuilder
2{
3 /// <summary>
4 /// 定义缺少 "依赖对
5 /// 象" 时的动作。
6 /// </summary>
7 public enum NotPresentBehavior
8 {
9 /// <summary>
10 /// 创建该对象。
11 /// </summary>
12 CreateNew,
13 /// <summary>
14 /// 返回 null。
15 /// </summary>
16 ReturnNull,
17 /// <summary>
18 /// 引发 DependencyMissingException
19 /// 异常。
20 /// </summary>
21 Throw,
22 }
23}
2{
3 /// <summary>
4 /// 定义缺少 "依赖对
5 /// 象" 时的动作。
6 /// </summary>
7 public enum NotPresentBehavior
8 {
9 /// <summary>
10 /// 创建该对象。
11 /// </summary>
12 CreateNew,
13 /// <summary>
14 /// 返回 null。
15 /// </summary>
16 ReturnNull,
17 /// <summary>
18 /// 引发 DependencyMissingException
19 /// 异常。
20 /// </summary>
21 Throw,
22 }
23}