1
|
|
|
2
|
|
#region Apache Notice
|
3
|
|
|
4
|
|
|
5
|
|
|
6
|
|
|
7
|
|
|
8
|
|
|
9
|
|
|
10
|
|
|
11
|
|
|
12
|
|
|
13
|
|
|
14
|
|
|
15
|
|
|
16
|
|
|
17
|
|
|
18
|
|
|
19
|
|
|
20
|
|
|
21
|
|
|
22
|
|
|
23
|
|
|
24
|
|
|
25
|
|
#endregion
|
26
|
|
|
27
|
|
#region Imports
|
28
|
|
using System;
|
29
|
|
using System.Collections;
|
30
|
|
using System.Xml.Serialization;
|
31
|
|
|
32
|
|
using IBatisNet.DataMapper.Configuration.Sql.Dynamic.Elements;
|
33
|
|
#endregion
|
34
|
|
|
35
|
|
namespace IBatisNet.DataMapper.Configuration
|
36
|
|
{
|
37
|
|
|
38
|
|
|
39
|
|
|
40
|
|
public class SerializerFactory
|
41
|
|
{
|
42
|
|
private static Hashtable _serializerMap = new Hashtable();
|
43
|
|
|
44
|
|
|
45
|
|
|
46
|
|
|
47
|
1
|
static SerializerFactory()
|
48
|
|
{
|
49
|
1
|
_serializerMap.Add("dynamic", new XmlSerializer(typeof(Dynamic)));
|
50
|
1
|
_serializerMap.Add("isEqual", new XmlSerializer(typeof(IsEqual)));
|
51
|
1
|
_serializerMap.Add("isNotEqual", new XmlSerializer(typeof(IsNotEqual)));
|
52
|
1
|
_serializerMap.Add("isGreaterEqual", new XmlSerializer(typeof(IsGreaterEqual)));
|
53
|
1
|
_serializerMap.Add("isGreaterThan", new XmlSerializer(typeof(IsGreaterThan)));
|
54
|
1
|
_serializerMap.Add("isLessEqual", new XmlSerializer(typeof(IsLessEqual)));
|
55
|
1
|
_serializerMap.Add("isLessThan", new XmlSerializer(typeof(IsLessThan)));
|
56
|
1
|
_serializerMap.Add("isNotEmpty", new XmlSerializer(typeof(IsNotEmpty)));
|
57
|
1
|
_serializerMap.Add("isEmpty", new XmlSerializer(typeof(IsEmpty)));
|
58
|
1
|
_serializerMap.Add("isNotNull", new XmlSerializer(typeof(IsNotNull)));
|
59
|
1
|
_serializerMap.Add("isNotParameterPresent", new XmlSerializer(typeof(IsNotParameterPresent)));
|
60
|
1
|
_serializerMap.Add("isNotPropertyAvailable", new XmlSerializer(typeof(IsNotPropertyAvailable)));
|
61
|
1
|
_serializerMap.Add("isNull", new XmlSerializer(typeof(IsNull)));
|
62
|
1
|
_serializerMap.Add("isParameterPresent", new XmlSerializer(typeof(IsParameterPresent)));
|
63
|
1
|
_serializerMap.Add("isPropertyAvailable", new XmlSerializer(typeof(IsPropertyAvailable)));
|
64
|
1
|
_serializerMap.Add("iterate", new XmlSerializer(typeof(Iterate)));
|
65
|
|
|
66
|
|
}
|
67
|
|
|
68
|
|
|
69
|
|
|
70
|
|
|
71
|
|
|
72
|
|
|
73
|
11730
|
public static XmlSerializer GetSerializer(string name)
|
74
|
|
{
|
75
|
11730
|
return (XmlSerializer) _serializerMap[name];
|
76
|
|
}
|
77
|
|
}
|
78
|
|
}
|
79
|
|
|