/// <summary> /// Add a segment its specific collection based on IsQualified handler /// </summary> /// <param name="segment"></param> public void Add(BaseStdSegment segment) { List <SegmentCollection> handlers = SegmentCollections .Where(c => c.SegmentDefinition.SegmentDefinitionName == segment.SegmentDefinitionName).ToList(); if (handlers.Any()) { handlers[0].Add(segment); } else { //todo: what to do with these pesky errors Console.WriteLine("should have had somethign to handle this"); } }
/// <summary> /// Add a specific instance of a the derived type to the collection /// </summary> /// <param name="segment">base segment</param> public void Add(BaseStdSegment segment) { Segments.Add(segment); }