Пример #1
0
        public IContribStore <IContrib> GetStore(IContrib contrib)
        {
            if (contrib is DropRate)
            {
                return(_dropRateStore as IContribStore <IContrib>);
            }
            if (contrib is Guide)
            {
                return(_guideStore as IContribStore <IContrib>);
            }
            if (contrib is Alias)
            {
                return(_aliasStore as IContribStore <IContrib>);
            }
            if (contrib is Note)
            {
                return(_noteStore as IContribStore <IContrib>);
            }

            throw new Exception($"No store in collection for type {contrib.GetType()}");
        }
Пример #2
0
 public IContrib FindByNaturalKey(IContrib contrib)
 {
     return(_stores.GetStore(contrib)
            .FindByNaturalKey(contrib));
 }