-
Notifications
You must be signed in to change notification settings - Fork 3
/
IRacingSdkHeaderDataAsList.cs
110 lines (88 loc) · 2.48 KB
/
IRacingSdkHeaderDataAsList.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
using System;
using System.Collections;
namespace IRSDKSharper
{
public class IRacingSdkHeaderDataAsList : IList
{
private readonly IRacingSdkData data;
public IRacingSdkHeaderDataAsList( IRacingSdkData data )
{
this.data = data;
}
public object this[ int index ]
{
get
{
switch ( index )
{
case 0: return new Datum( "Version", $"{data.Version}" );
case 1: return new Datum( "Status", $"{data.Status}" );
case 2: return new Datum( "TickRate", $"{data.TickRate}" );
case 3: return new Datum( "SessionInfoUpdate", $"{data.SessionInfoUpdate}" );
case 4: return new Datum( "SessionInfoLength", $"{data.SessionInfoLength}" );
case 5: return new Datum( "SessionInfoOffset", $"{data.SessionInfoOffset}" );
case 6: return new Datum( "VarCount", $"{data.VarCount}" );
case 7: return new Datum( "VarHeaderOffset", $"{data.VarHeaderOffset}" );
case 8: return new Datum( "BufferCount", $"{data.BufferCount}" );
case 9: return new Datum( "BufferLength", $"{data.BufferLength}" );
case 10: return new Datum( "TickCount", $"{data.TickCount}" );
case 11: return new Datum( "Offset", $"{data.Offset}" );
case 12: return new Datum( "FramesDropped", $"{data.FramesDropped}" );
default: throw new IndexOutOfRangeException();
}
}
set => throw new NotImplementedException();
}
public bool IsFixedSize => true;
public bool IsReadOnly => true;
public int Count => 13;
public bool IsSynchronized => false;
public object SyncRoot => throw new NotImplementedException();
public int Add( object value )
{
throw new NotImplementedException();
}
public void Clear()
{
throw new NotImplementedException();
}
public bool Contains( object value )
{
throw new NotImplementedException();
}
public void CopyTo( Array array, int index )
{
throw new NotImplementedException();
}
public IEnumerator GetEnumerator()
{
throw new NotImplementedException();
}
public int IndexOf( object value )
{
throw new NotImplementedException();
}
public void Insert( int index, object value )
{
throw new NotImplementedException();
}
public void Remove( object value )
{
throw new NotImplementedException();
}
public void RemoveAt( int index )
{
throw new NotImplementedException();
}
public class Datum
{
public string key;
public string value;
public Datum( string key, string value )
{
this.key = key;
this.value = value;
}
}
}
}