using System;
using System.Data;
using System.Xml.Serialization;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using System.Runtime.Serialization;
using DataHolder.Containers.Property;
using DataHolder.Containers.ParentActions;
namespace DataHolder.Containers{
public class GenericDataCollection<GD> : DataHolder.Containers.GenericDataCollection
where GD:GenericData
{
protected GenericDataCollectionView<GD> l_defaultView;
public GenericDataCollection()
{}
public GenericDataCollection(SerializationInfo info, StreamingContext context)
: base(info, context)
{}
public GD this[int index]
{
get
{
return (GD)GetObjectAt(index);
}
set
{
SetObjectAt(index, value);
}
}
public void Add(GD value)
{
base.Add( value );
}
public int IndexOf(GD value)
{
return( base.IndexOf( value ) );
}
public void Insert(int index, GD value)
{
base.Insert( index, value );
}
public void Remove(GD value)
{
base.Remove( value );
}
public bool Contains(GD value)
{
return( base.Contains( value ) );
}
public override Type GenericDataType
{
get
{
return typeof(GD);
}
}
protected override BaseGenericDataCollectionView GetDefaultView()
{
return DefaultView;
}
protected override void OnDispose()
{
base.OnDispose();
if (l_defaultView != null)
l_defaultView.Dispose();
l_defaultView = null;
}
[Browsable(false)]
public GenericDataCollectionView<GD> DefaultView
{
get
{
if (l_defaultView == null)
l_defaultView = new GenericDataCollectionView<GD>(this, true, true, true);
return l_defaultView;
}
}
}
}
|