public bool TryCreateObject(ObjectType objectType, out IPersistable persistObj) { switch (objectType) { case ObjectType.RowMemberInfo: persistObj = new Tablix.RowMemberInfo(); break; case ObjectType.SizeInfo: persistObj = new Tablix.SizeInfo(); break; case ObjectType.DetailCell: persistObj = new Tablix.DetailCell(); break; case ObjectType.CornerCell: persistObj = new Tablix.CornerCell(); break; case ObjectType.MemberCell: persistObj = new Tablix.MemberCell(); break; case ObjectType.StreamMemberCell: persistObj = new Tablix.StreamMemberCell(); break; case ObjectType.RPLMemberCell: persistObj = new Tablix.RPLMemberCell(); break; default: persistObj = null; return(false); } return(true); }
public bool TryCreateObject(ObjectType objectType, out IPersistable persistObj) { switch (objectType) { case ObjectType.ItemSizes: persistObj = new ItemSizes(); break; case ObjectType.PageBreakProperties: persistObj = new PageBreakProperties(); break; case ObjectType.HiddenPageItem: persistObj = new HiddenPageItem(); break; case ObjectType.NoRowsItem: persistObj = new NoRowsItem(); break; case ObjectType.SubReport: persistObj = new SubReport(); break; case ObjectType.ReportBody: persistObj = new ReportBody(); break; case ObjectType.Rectangle: persistObj = new Rectangle(); break; case ObjectType.TextBox: persistObj = new TextBox(); break; case ObjectType.Paragraph: persistObj = new Paragraph(); break; case ObjectType.TextRun: persistObj = new TextRun(); break; case ObjectType.TextBoxOffset: persistObj = new TextBox.TextBoxOffset(); break; case ObjectType.Line: persistObj = new Line(); break; case ObjectType.Chart: persistObj = new Chart(); break; case ObjectType.GaugePanel: persistObj = new GaugePanel(); break; case ObjectType.Map: persistObj = new Map(); break; case ObjectType.Image: persistObj = new Image(); break; case ObjectType.Tablix: persistObj = new Tablix(); break; case ObjectType.RowInfo: persistObj = new Tablix.RowInfo(); break; case ObjectType.SizeInfo: persistObj = new Tablix.SizeInfo(); break; case ObjectType.ColumnInfo: persistObj = new Tablix.ColumnInfo(); break; case ObjectType.PageDetailCell: persistObj = new Tablix.PageDetailCell(); break; case ObjectType.PageCornerCell: persistObj = new Tablix.PageCornerCell(); break; case ObjectType.PageMemberCell: persistObj = new Tablix.PageMemberCell(); break; case ObjectType.PageStructStaticMemberCell: persistObj = new Tablix.PageStructStaticMemberCell(); break; case ObjectType.PageStructDynamicMemberCell: persistObj = new Tablix.PageStructDynamicMemberCell(); break; default: persistObj = null; return(false); } return(true); }