-
Notifications
You must be signed in to change notification settings - Fork 7
/
16Serializables.cs
114 lines (97 loc) · 2.61 KB
/
16Serializables.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
using System;
using System.Collections;
using System.Collections.Generic;
namespace ZombiesMod
{
[Serializable]
public class VehicleCollection : IList<VehicleData>, ICollection<VehicleData>, IEnumerable<VehicleData>, IEnumerable
{
private readonly List<VehicleData> _vehicles;
public event VehicleCollection.ListChangedEvent ListChanged;
public VehicleCollection()
{
this._vehicles = new List<VehicleData>();
}
public int Count
{
get
{
return this._vehicles.Count;
}
}
public bool IsReadOnly
{
get
{
return ((ICollection<VehicleData>) this._vehicles).IsReadOnly;
}
}
IEnumerator IEnumerable.GetEnumerator()
{
return (IEnumerator) this.GetEnumerator();
}
public IEnumerator<VehicleData> GetEnumerator()
{
return (IEnumerator<VehicleData>) this._vehicles.GetEnumerator();
}
public void Add(VehicleData item)
{
this._vehicles.Add(item);
// ISSUE: reference to a compiler-generated field
VehicleCollection.ListChangedEvent listChanged = this.ListChanged;
if (listChanged == null)
return;
listChanged(this);
}
public void Clear()
{
this._vehicles.Clear();
// ISSUE: reference to a compiler-generated field
VehicleCollection.ListChangedEvent listChanged = this.ListChanged;
if (listChanged == null)
return;
listChanged(this);
}
public bool Contains(VehicleData item)
{
return this._vehicles.Contains(item);
}
public void CopyTo(VehicleData[] array, int arrayIndex)
{
this._vehicles.CopyTo(array, arrayIndex);
}
public bool Remove(VehicleData item)
{
bool flag = this._vehicles.Remove(item);
// ISSUE: reference to a compiler-generated field
VehicleCollection.ListChangedEvent listChanged = this.ListChanged;
if (listChanged != null)
listChanged(this);
return flag;
}
public int IndexOf(VehicleData item)
{
return this._vehicles.IndexOf(item);
}
public void Insert(int index, VehicleData item)
{
this._vehicles.Insert(index, item);
}
public void RemoveAt(int index)
{
this._vehicles.RemoveAt(index);
}
public VehicleData this[int index]
{
get
{
return this._vehicles[index];
}
set
{
this._vehicles[index] = value;
}
}
public delegate void ListChangedEvent(VehicleCollection sender);
}
}