summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/ReadOnlyListAdapter.cs
blob: 0ffdaef53f5f41d80602e9cdf23a4988831d4fbd (plain)
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
´╗┐using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace Xamarin.Forms
{
	internal sealed class ReadOnlyListAdapter : IList
	{
		readonly IReadOnlyCollection<object> _collection;
		readonly IReadOnlyList<object> _list;

		public ReadOnlyListAdapter(IReadOnlyList<object> list)
		{
			_list = list;
			_collection = list;
		}

		public ReadOnlyListAdapter(IReadOnlyCollection<object> collection)
		{
			_collection = collection;
		}

		public void CopyTo(Array array, int index)
		{
			throw new NotImplementedException();
		}

		public int Count
		{
			get { return _collection.Count; }
		}

		public bool IsSynchronized
		{
			get { throw new NotImplementedException(); }
		}

		public object SyncRoot
		{
			get { throw new NotImplementedException(); }
		}

		public IEnumerator GetEnumerator()
		{
			return _collection.GetEnumerator();
		}

		public int Add(object value)
		{
			throw new NotImplementedException();
		}

		public void Clear()
		{
			throw new NotImplementedException();
		}

		public bool Contains(object value)
		{
			return _list.Contains(value);
		}

		public int IndexOf(object value)
		{
			return _list.IndexOf(value);
		}

		public void Insert(int index, object value)
		{
			throw new NotImplementedException();
		}

		public bool IsFixedSize
		{
			get { throw new NotImplementedException(); }
		}

		public bool IsReadOnly
		{
			get { return true; }
		}

		public object this[int index]
		{
			get { return _list[index]; }
			set { throw new NotImplementedException(); }
		}

		public void Remove(object value)
		{
			throw new NotImplementedException();
		}

		public void RemoveAt(int index)
		{
			throw new NotImplementedException();
		}
	}
}