public void Add(Tuple t) { if (Identifier != null) { if (t.Identifier == null) { throw new Exception("Cannot add a tuple which does not belong to this collection."); } if ( t.Identifier.StartsWith(Identifier) == false ) { throw new Exception("Cannot add a tuple which does not belong to this collection."); } } List.Add(t); }
public void Remove(Tuple t) { List.Remove(t); }
/// <summary> /// When id of this object ia A.B and id argument is C.D then /// id of the tuple will be A.B.C.D /// </summary> /// <param name="size"></param> /// <param name="id"></param> /// <returns></returns> public Tuple CreateTuple(int size,string id) { string tupleId = id; if (Identifier != null) { tupleId = Identifier; if (id != null) { tupleId = Identifier + "." + id; } } Tuple t = new Tuple(size,_manager,tupleId); return t; }