예제 #1
0
        /**********************************************************************************/
        /// <summary>
        /// Replaces all crates that have label mathching to passed crate label with passed crate
        /// </summary>
        /// <returns></returns>
        public static int ReplaceByLabel(this ICrateStorage storage, Crate crate)
        {
            var predicate = new Predicate <Crate>(x => x.Label == crate.Label);

            return(storage.Replace(predicate, crate));
        }
예제 #2
0
 public int Replace(Predicate <Crate> predicate, Crate crate)
 {
     return(_crateStorage.Replace(predicate, crate));
 }