예제 #1
0
        public Gun GetById(string id)
        {
            if (!cachedGuns.TryGetValue(id, out var gun))
            {
                gun = origin.GetById(id);
                cachedGuns.Add(gun.Id, gun);
            }

            return(gun);
        }
예제 #2
0
 public Gun Get(string id)
 {
     return(repository.GetById(id));
 }