public int amount(TypeComond typeComond) { if (dataInt.ContainsKey(typeComond)) { return(dataInt[typeComond]); } return(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)); }
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} не зарегистрирован для команд"); }
public ComondModul(TypeComond action, IEnumerable <T> date) : this() { Action = action; Data = date; }