public static Workitem CreateWorkitem(AssetFactory assetFactory, string assetType, Workitem parent, IEntityContainer entityContainer) { Asset asset; switch (assetType) { case Entity.TaskType: case Entity.TestType: asset = assetFactory.CreateAssetForSecondaryWorkitem(assetType, parent); var workitem = CreateWorkitem(asset, parent, entityContainer); parent.Children.Add(workitem); break; case Entity.DefectType: asset = assetFactory.CreateAssetForPrimaryWorkitem(Entity.DefectType); break; default: throw new NotSupportedException(assetType + " is not supported."); } return CreateWorkitem(asset, parent, entityContainer); }
public static Workitem CreateWorkitem(AssetFactory assetFactory, string assetType, Workitem parent, IEntityContainer entityContainer) { Asset asset; switch (assetType) { case Entity.TaskType: case Entity.TestType: asset = assetFactory.CreateAssetForSecondaryWorkitem(assetType, parent); var workitem = CreateWorkitem(asset, parent, entityContainer); parent.Children.Add(workitem); break; case Entity.DefectType: asset = assetFactory.CreateAssetForPrimaryWorkitem(Entity.DefectType); break; default: throw new NotSupportedException(assetType + " is not supported."); } return(CreateWorkitem(asset, parent, entityContainer)); }
public Workitem CreateWorkitem(string assetType, Workitem parent, IEntityContainer entityContainer) { var assetFactory = new AssetFactory(this, CurrentProject, LoggerFactory, AttributesToQuery); return(WorkitemFactory.CreateWorkitem(assetFactory, assetType, parent, entityContainer)); }
public Workitem CreateWorkitem(string assetType, Workitem parent, IEntityContainer entityContainer) { var assetFactory = new AssetFactory(this, CurrentProject, LoggerFactory, AttributesToQuery); return WorkitemFactory.CreateWorkitem(assetFactory, assetType, parent, entityContainer); }