private static ContentItem GetInstanceOfContentItem(string typeName) { ContentItem contentItem = null; switch (typeName.ToUpperInvariant()) { case "OBSERVATION": contentItem = new Observation(); break; case "EVALUATION": contentItem = new Evaluation(); break; case "ACTION": contentItem = new Action(); break; case "INSTRUCTION": contentItem = new Instruction(); break; case "SECTION": contentItem = new Section(); break; case "ADMIN_ENTRY": contentItem = new AdminEntry(); break; default: Debug.WriteLine("unknown typename: " + typeName); break; } return contentItem; }
private static ContentItem GetInstanceOfContentItem(string typeName) { ContentItem contentItem = null; switch (typeName.ToUpperInvariant()) { case "OBSERVATION": contentItem = new Observation(); break; case "EVALUATION": contentItem = new Evaluation(); break; case "ACTION": contentItem = new Action(); break; case "INSTRUCTION": contentItem = new Instruction(); break; case "SECTION": contentItem = new Section(); break; case "ADMIN_ENTRY": contentItem = new AdminEntry(); break; default: Debug.WriteLine("unknown typename: " + typeName); break; } return(contentItem); }