1
|
|
#region Copyright
|
2
|
|
|
3
|
|
|
4
|
|
|
5
|
|
|
6
|
|
|
7
|
|
|
8
|
|
|
9
|
|
|
10
|
|
|
11
|
|
|
12
|
|
|
13
|
|
|
14
|
|
|
15
|
|
|
16
|
|
|
17
|
|
#endregion
|
18
|
|
|
19
|
|
using System;
|
20
|
|
|
21
|
|
namespace Seasar.Framework.Container.Util
|
22
|
|
{
|
23
|
|
|
24
|
|
|
25
|
|
|
26
|
|
public sealed class InstanceModeUtil
|
27
|
|
{
|
28
|
0
|
private InstanceModeUtil()
|
29
|
|
{
|
30
|
|
}
|
31
|
|
|
32
|
1092
|
public static bool IsSingleton(string mode)
|
33
|
|
{
|
34
|
1092
|
return ContainerConstants.INSTANCE_SINGLETON.ToLower().Equals(mode.ToLower());
|
35
|
|
}
|
36
|
|
|
37
|
14
|
public static bool IsPrototype(string mode)
|
38
|
|
{
|
39
|
14
|
return ContainerConstants.INSTANCE_PROTOTYPE.ToLower().Equals(mode.ToLower());
|
40
|
|
}
|
41
|
|
|
42
|
6
|
public static bool IsRequest(string mode)
|
43
|
|
{
|
44
|
6
|
return ContainerConstants.INSTANCE_REQUEST.ToLower().Equals(mode.ToLower());
|
45
|
|
}
|
46
|
|
|
47
|
6
|
public static bool IsSession(string mode)
|
48
|
|
{
|
49
|
6
|
return ContainerConstants.INSTANCE_SESSION.ToLower().Equals(mode.ToLower());
|
50
|
|
}
|
51
|
|
|
52
|
57
|
public static bool IsOuter(string mode)
|
53
|
|
{
|
54
|
57
|
return ContainerConstants.INSTANCE_OUTER.ToLower().Equals(mode.ToLower());
|
55
|
|
}
|
56
|
|
}
|
57
|
|
}
|
58
|
|
|