mirror of
https://github.com/mgroves/MonodroidStockPortfolio.git
synced 2024-12-29 11:17:07 +00:00
29 lines
No EOL
712 B
C#
29 lines
No EOL
712 B
C#
using System.Collections.Generic;
|
|
using Android.Content;
|
|
using Android.Widget;
|
|
using System.Linq;
|
|
|
|
namespace MonoStockPortfolio.Framework
|
|
{
|
|
public abstract class GenericArrayAdapter<T> : BaseAdapter<T>
|
|
{
|
|
private readonly IList<T> _items;
|
|
protected readonly Context Context;
|
|
|
|
protected GenericArrayAdapter(Context context, IEnumerable<T> results)
|
|
{
|
|
_items = results.ToList();
|
|
Context = context;
|
|
}
|
|
|
|
public override int Count
|
|
{
|
|
get { return _items.Count(); }
|
|
}
|
|
|
|
public override T this[int position]
|
|
{
|
|
get { return _items[position]; }
|
|
}
|
|
}
|
|
} |