78 lines
1.4 KiB
C#
78 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
|
|
public class Aggregato : CollezioneAggregato
|
|
{
|
|
private ptfType[] _ptfArray;
|
|
|
|
public ptfType[] ArrayPtf
|
|
{
|
|
get
|
|
{
|
|
return this._ptfArray;
|
|
}
|
|
set
|
|
{
|
|
this._ptfArray = value;
|
|
}
|
|
}
|
|
|
|
public void AddCollectionAggregateToAggregate()
|
|
{
|
|
//int count = this.ListaAggregatiProprieta.Count;
|
|
//ptfType[] _ptf = new ptfType[count];
|
|
|
|
//for (int i = 0; i < count; i++)
|
|
//{
|
|
// _ptf[i] = new ptfType();
|
|
// _ptf[i] = this.ListaAggregatiProprieta[i];
|
|
//}
|
|
|
|
this.ArrayPtf = ListaAggregatiProprieta.ToArray(); }
|
|
}
|
|
|
|
public class CollezioneAggregato
|
|
{
|
|
List<ptfType> ListaAggregati = new List<ptfType>();
|
|
|
|
public void Add(ptfType child)
|
|
{
|
|
ListaAggregati.Add(child);
|
|
}
|
|
|
|
public void Remove(ptfType child)
|
|
{
|
|
ListaAggregati.Remove(child);
|
|
}
|
|
|
|
public List<ptfType> ListaAggregatiProprieta
|
|
{
|
|
get
|
|
{
|
|
return this.ListaAggregati;
|
|
}
|
|
set
|
|
{
|
|
this.ListaAggregati = value;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Indexer
|
|
//public Aggregato this[Aggregato _aggregato]
|
|
//{
|
|
// get
|
|
// {
|
|
// if (this.ListaAggregati.Contains(_aggregato))
|
|
// return _aggregato;
|
|
// else
|
|
// return null;
|
|
// }
|
|
//}
|
|
}
|
|
|
|
|