public IEnumerable <DrawingObject> Parse(string[] content) { Dictionary <int, DrawingObject> drawables = new Dictionary <int, DrawingObject>(); for (int i = 0; i < content.Length; i++) { string[] token = content[i].Split(new char[0], StringSplitOptions.RemoveEmptyEntries); DrawingObject result = DrawableFactory.ConstructDrawable(drawables, token); result.SetState(IdleState.GetState()); drawables.Add(result.Id, result); } List <DrawingObject> finalDrawable = new List <DrawingObject>(); foreach (DrawingObject drawable in drawables.Values) { finalDrawable.Add(drawable); } return(finalDrawable); }