Line | |
---|
1 | using System;
|
---|
2 | using System.Collections;
|
---|
3 |
|
---|
4 | namespace IndianHealthService.BMXNet.Tools.SchemaBuilder
|
---|
5 | {
|
---|
6 | /// <summary>
|
---|
7 | /// Implements collection of BMXSchemaField objects
|
---|
8 | /// </summary>
|
---|
9 | [Serializable]
|
---|
10 | internal class BMXSchemaFields: IEnumerable
|
---|
11 | {
|
---|
12 | private Hashtable m_SchemaFieldList;
|
---|
13 |
|
---|
14 | internal BMXSchemaFields()
|
---|
15 | {
|
---|
16 | m_SchemaFieldList = new Hashtable();
|
---|
17 | }
|
---|
18 |
|
---|
19 | public void AddSchemaField(BMXSchemaField SchemaField)
|
---|
20 | {
|
---|
21 | m_SchemaFieldList.Add(SchemaField.Key, SchemaField);
|
---|
22 | }
|
---|
23 |
|
---|
24 | public void RemoveSchemaField(int Key)
|
---|
25 | {
|
---|
26 | m_SchemaFieldList.Remove(Key);
|
---|
27 | }
|
---|
28 |
|
---|
29 | public int SchemaFieldCount
|
---|
30 | {
|
---|
31 | get
|
---|
32 | {
|
---|
33 | return m_SchemaFieldList.Count;
|
---|
34 | }
|
---|
35 | }
|
---|
36 |
|
---|
37 | public void ClearAllSchemaFields()
|
---|
38 | {
|
---|
39 | m_SchemaFieldList.Clear();
|
---|
40 | }
|
---|
41 |
|
---|
42 | public IEnumerator GetEnumerator()
|
---|
43 | {
|
---|
44 | return m_SchemaFieldList.GetEnumerator();
|
---|
45 | }
|
---|
46 |
|
---|
47 | public BMXSchemaField GetSchemaField(int Key)
|
---|
48 | {
|
---|
49 | BMXSchemaField c = (BMXSchemaField) m_SchemaFieldList[Key];
|
---|
50 | return c;
|
---|
51 | }
|
---|
52 |
|
---|
53 | /// <summary>
|
---|
54 | /// Exposes the BMXSchemaFields internal Hashtable
|
---|
55 | /// </summary>
|
---|
56 | public Hashtable SchemaFieldTable
|
---|
57 | {
|
---|
58 | get
|
---|
59 | {
|
---|
60 | return this.m_SchemaFieldList;
|
---|
61 | }
|
---|
62 | }
|
---|
63 |
|
---|
64 |
|
---|
65 | }
|
---|
66 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.