2012-08-09 09:45:04 +00:00
|
|
|
using System;
|
2011-11-17 21:02:52 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
2011-11-17 20:35:25 +00:00
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2011-11-17 20:35:25 +00:00
|
|
|
|
|
|
|
namespace ANX.Framework.Media
|
|
|
|
{
|
2012-08-26 10:31:54 +00:00
|
|
|
public sealed class ArtistCollection : IEnumerable<Artist>, IEnumerable, IDisposable
|
2011-11-17 20:35:25 +00:00
|
|
|
{
|
2011-11-17 21:02:52 +00:00
|
|
|
private List<Artist> artists;
|
|
|
|
|
|
|
|
public bool IsDisposed
|
|
|
|
{
|
|
|
|
get;
|
|
|
|
private set;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int Count
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return artists.Count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public Artist this[int index]
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return artists[index];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-26 10:31:54 +00:00
|
|
|
internal ArtistCollection()
|
2011-11-17 21:02:52 +00:00
|
|
|
{
|
|
|
|
artists = new List<Artist>();
|
|
|
|
IsDisposed = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
~ArtistCollection()
|
|
|
|
{
|
|
|
|
Dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
#region GetEnumerator
|
|
|
|
public IEnumerator<Artist> GetEnumerator()
|
|
|
|
{
|
|
|
|
return artists.GetEnumerator();
|
|
|
|
}
|
|
|
|
|
|
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
|
|
{
|
|
|
|
return artists.GetEnumerator();
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Dispose
|
|
|
|
public void Dispose()
|
|
|
|
{
|
|
|
|
IsDisposed = true;
|
|
|
|
artists.Clear();
|
|
|
|
}
|
|
|
|
#endregion
|
2011-11-17 20:35:25 +00:00
|
|
|
}
|
|
|
|
}
|