private void PopulateChildTargetBids <T>(BulkSubTarget <T> target, Dictionary <Type, List <BulkTargetBid> > groups) where T : BulkTargetBid { if (!groups.ContainsKey(typeof(T))) { target.Status = V10.Bulk.Entities.Status.Deleted; return; } var bids = groups[typeof(T)].Cast <T>(); target.SetBids(bids); }
private void PopulateChildTargetIdentities <T>(BulkSubTarget <T> target, Dictionary <Type, List <TIdentifier> > groups) where T : BulkTargetBid { // no delete all row for this target bid type if (!groups.ContainsKey(typeof(T))) { SetDefaultIdentifier(target); return; } var identities = groups[typeof(T)]; // should have only one delete all row at most foreach (var identifier in identities) { target.SetIdentifier(identifier); } }
private void SetDefaultIdentifier <TBid>(BulkSubTarget <TBid> target) where TBid : BulkTargetBid { var identifier = CreateIdentifier(typeof(TBid)); identifier.EntityId = EntityId; if (Target != null) { identifier.TargetId = Target.Id; } identifier.EntityName = EntityName; identifier.ParentEntityName = ParentEntityName; if (Status == V10.Bulk.Entities.Status.Deleted) { target.Status = V10.Bulk.Entities.Status.Deleted; } target.SetIdentifier(identifier); }