コード例 #1
0
 // We allow the Fetch calls (and delegates) to have multiple parameters
 // But the IHandleXYZ interface can only have one criteria as a parameter
 // with a tuple to handle multiple parameters
 // ObjectPortal will bridge the two by turning the multiple paramters to a tuple
 public void FetchChild(CriteriaBase g, BusinessItemDto dto) // I only need the dependency within this method
 {
     using (BypassPropertyChecks)
     {
         this.FetchChildID = dto.FetchUniqueID;
         this.Criteria     = g.Guid;
     }
 }
コード例 #2
0
        public void FetchChild(CriteriaBase criteria, System.Tuple <IObjectPortal <IBusinessItem>, IBusinessItemDal, IMobileDependency <IObjectPortal <IBusinessItem> > > d)
        {
            var dtos = d.Item2.Fetch(criteria.Guid);

            foreach (var dto in dtos)
            {
                // We allow the Fetch calls (and delegates) to have multiple parameters
                // But the IHandleXYZ interface can only have one criteria as a parameter
                // with a tuple to handle multiple parameters
                // ObjectPortal will bridge the two by turning the multiple paramters to a tuple

                Add(d.Item1.FetchChild(Tuple.Create <CriteriaBase, BusinessItemDto>(criteria, dto)));
            }

            this._newChild = d.Item3;
        }