summary refs log tree commit diff
path: root/crypto/src/util/collections/UnmodifiableListProxy.cs
blob: 9d00737ef6b2a969b4929da2d9d87957b9701a92 (plain) (blame)
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
using System;
using System.Collections;

namespace Org.BouncyCastle.Utilities.Collections
{
	public class UnmodifiableListProxy
		: UnmodifiableList
	{
		private readonly IList l;

		public UnmodifiableListProxy(IList l)
		{
			this.l = l;
		}

		public override bool Contains(object o)
		{
			return l.Contains(o);
		}

		public override void CopyTo(Array array, int index)
		{
			l.CopyTo(array, index);
		}

		public override int Count
		{
			get { return l.Count; }
		}

		public override IEnumerator GetEnumerator()
		{
			return l.GetEnumerator();
		}

		public override int IndexOf(object o)
		{
			return l.IndexOf(o);
		}

		public override bool IsFixedSize
		{
			get { return l.IsFixedSize; }
		}

		public override bool IsSynchronized
		{
			get { return l.IsSynchronized; }
		}

		public override object SyncRoot
		{
			get { return l.SyncRoot; }
		}

		protected override object GetValue(int i)
		{
			return l[i];
		}
	}
}