forked from cityindex-attic/CIAPI.CS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExtendedTableInfo.cs
105 lines (90 loc) · 2.61 KB
/
ExtendedTableInfo.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
namespace Lightstreamer.DotNet.Client
{
using System;
using System.Text;
public class ExtendedTableInfo : SimpleTableInfo
{
internal string[] fields;
internal string[] items;
public ExtendedTableInfo(string[] items, string mode, string[] fields, bool snapshot) : base(GetGroupName(items), mode, GetSchemaName(fields), snapshot)
{
this.items = (string[]) items.Clone();
this.fields = (string[]) fields.Clone();
}
public override object Clone()
{
return base.MemberwiseClone();
}
[Obsolete("Use the Fields property instead of the GetFields method.")]
public virtual string[] GetFields()
{
return (string[]) this.fields.Clone();
}
[Obsolete("Use the Group property instead of the GetGroup method.")]
public override string GetGroup()
{
return base.group;
}
private static string GetGroupName(string[] items)
{
StringBuilder builder = new StringBuilder(items[0]);
for (int i = 1; i < items.Length; i++)
{
builder.Append(' ');
builder.Append(items[i]);
}
return builder.ToString();
}
[Obsolete("Use the Items property instead of the GetItems method.")]
public virtual string[] GetItems()
{
return (string[]) this.items.Clone();
}
[Obsolete("Use the Schema property instead of the GetSchema method.")]
public override string GetSchema()
{
return base.schema;
}
private static string GetSchemaName(string[] fields)
{
StringBuilder builder = new StringBuilder(fields[0]);
for (int i = 1; i < fields.Length; i++)
{
builder.Append(' ');
builder.Append(fields[i]);
}
return builder.ToString();
}
public override void SetRange(int start, int end)
{
}
public virtual string[] Fields
{
get
{
return this.GetFields();
}
}
public override string Group
{
get
{
return base.group;
}
}
public virtual string[] Items
{
get
{
return this.GetItems();
}
}
public override string Schema
{
get
{
return base.schema;
}
}
}
}