forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBasicClass.cs
192 lines (164 loc) · 3.83 KB
/
BasicClass.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
namespace NHibernate.DomainModel.NHSpecific
{
/// <summary>
/// Summary description for BasicClass.
/// </summary>
[Serializable]
public class BasicClass
{
private int _id;
private char _characterProperty;
private System.Type _classProperty;
private CultureInfo _cultureInfoProperty;
private DateTime _dateTimeProperty = DateTime.Today;
private short _int16Property;
private int _int32Property;
private long _int64Property;
private float _singleProperty;
private string _stringProperty;
private DateTime _ticksProperty;
private bool _trueFalseProperty;
private bool _yesNoProperty;
private int _privateField;
private string[] _stringArray;
private int[] _int32Array;
private IList<string> _stringBag;
private IList<string> _stringList;
private IDictionary<string, string> _stringMap;
private IDictionary<string, string> _stringMapGeneric;
private ISet<string> _stringSet;
public BasicClass()
{
}
private int PrivateField
{
get { return _privateField; }
}
public int Id
{
get { return _id; }
set { _id = value; }
}
public char CharacterProperty
{
get { return _characterProperty; }
set { _characterProperty = value; }
}
public System.Type ClassProperty
{
get { return _classProperty; }
set { _classProperty = value; }
}
public CultureInfo CultureInfoProperty
{
get { return _cultureInfoProperty; }
set { _cultureInfoProperty = value; }
}
public DateTime DateTimeProperty
{
get { return _dateTimeProperty; }
set { _dateTimeProperty = value; }
}
public short Int16Property
{
get { return _int16Property; }
set { _int16Property = value; }
}
public int Int32Property
{
get { return _int32Property; }
set { _int32Property = value; }
}
public long Int64Property
{
get { return _int64Property; }
set { _int64Property = value; }
}
public float SingleProperty
{
get { return _singleProperty; }
set { _singleProperty = value; }
}
public string StringProperty
{
get { return _stringProperty; }
set { _stringProperty = value; }
}
public DateTime TicksProperty
{
get { return _ticksProperty; }
set { _ticksProperty = value; }
}
public bool TrueFalseProperty
{
get { return _trueFalseProperty; }
set { _trueFalseProperty = value; }
}
public bool YesNoProperty
{
get { return _yesNoProperty; }
set { _yesNoProperty = value; }
}
/// <summary>
///
/// </summary>
/// <remarks>
/// NHibernate knows nothing about this Property. This Property
/// is provided so the Test Fixtures can set and get the value of the
/// field <c>_privateField</c> to make sure that NHibernate is reading
/// and writing the field correctly.
/// </remarks>
public int ValueOfPrivateField
{
get { return _privateField; }
set { _privateField = value; }
}
public string[] StringArray
{
get { return _stringArray; }
set { _stringArray = value; }
}
public int[] Int32Array
{
get { return _int32Array; }
set { _int32Array = value; }
}
public IList<string> StringBag
{
get { return _stringBag; }
set { _stringBag = value; }
}
public IList<string> StringList
{
get { return _stringList; }
set { _stringList = value; }
}
public IDictionary<string, string> StringMap
{
get { return _stringMap; }
set { _stringMap = value; }
}
public IDictionary<string, string> StringMapGeneric
{
get { return _stringMapGeneric; }
set { _stringMapGeneric = value; }
}
public ISet<string> StringSet
{
get { return _stringSet; }
set { _stringSet = value; }
}
public void AddToStringSet(string stringValue)
{
if (StringSet == null)
{
StringSet = new HashSet<string>();
}
StringSet.Add(stringValue);
}
}
}