Exemplo n.º 1
0
 public int amount(TypeComond typeComond)
 {
     if (dataInt.ContainsKey(typeComond))
     {
         return(dataInt[typeComond]);
     }
     return(0);
 }
Exemplo n.º 2
0
        public IComondModul <IMyEntity> Clone(TypeComond action, IEnumerable <IMyEntity> date)
        {
            IEnumerable <T> date2 = null;

            if (date != null)
            {
                date2 = date.OfType <T>();
            }
            return((IComondModul <IMyEntity>) new ComondModul <T>(action, date2));
        }
Exemplo n.º 3
0
        public static IComondModul <IMyEntity> GetComond(Type type, TypeComond action, IEnumerable <IMyEntity> date)
        {
            IComondModul <IMyEntity> como = comond.Where(r => type.GetInterfaces().Contains(r.TypeModel) || (r.TypeModel == type && !r.TypeModel.IsClass)).LastOrDefault();

            if (como != null)
            {
                return(como.Clone(action, date));
            }
            throw new Exception($"Тип {type.Name} не зарегистрирован для команд");
        }
Exemplo n.º 4
0
 public ComondModul(TypeComond action, IEnumerable <T> date) : this()
 {
     Action = action;
     Data   = date;
 }