summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/ReadOnlyListAdapter.cs
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-03-22 13:02:25 -0700
committerJason Smith <jason.smith@xamarin.com>2016-03-22 16:13:41 -0700
commit17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch)
treeb5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.Core/ReadOnlyListAdapter.cs
downloadxamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip
Initial import
Diffstat (limited to 'Xamarin.Forms.Core/ReadOnlyListAdapter.cs')
-rw-r--r--Xamarin.Forms.Core/ReadOnlyListAdapter.cs100
1 files changed, 100 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/ReadOnlyListAdapter.cs b/Xamarin.Forms.Core/ReadOnlyListAdapter.cs
new file mode 100644
index 00000000..0ffdaef5
--- /dev/null
+++ b/Xamarin.Forms.Core/ReadOnlyListAdapter.cs
@@ -0,0 +1,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();
+ }
+ }
+} \ No newline at end of file