/**********************************************************************************/ /// <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)); }
public int Replace(Predicate <Crate> predicate, Crate crate) { return(_crateStorage.Replace(predicate, crate)); }