private static bool FiltratePush(SystemInfo systemInfo, Push push, params Filter[] filters) { var isFiltered = false; foreach (var filter in filters) { isFiltered |= filter.IsPushFiltered(systemInfo, push); } return(isFiltered); }
private static Push[] CreatePushs(int pushsCount) { var pushsArr = new Push[pushsCount]; for (int i = 0; i < pushsCount; i++) { var inputSize = int.Parse(Console.ReadLine()); var input = new InputParser(inputSize); pushsArr[i] = Push.CreateNewPush(input.Type, input); } return(pushsArr); }
public override bool IsPushFiltered(SystemInfo systemInfo, Push push) { return(((IAge)push).Age > systemInfo.Age); }
public override bool IsPushFiltered(SystemInfo systemInfo, Push push) { return(systemInfo.OsVersion > ((ITech)push).OsVersion); }
public override bool IsPushFiltered(SystemInfo systemInfo, Push push) { var locationPush = (ILocation)push; return(IsInRadius(systemInfo.XCoard, systemInfo.YCoard, locationPush.XCoard, locationPush.YCoard, locationPush.Radius)); }
public abstract bool IsPushFiltered(SystemInfo systemInfo, Push push);
public override bool IsPushFiltered(SystemInfo systemInfo, Push push) { return(((IGender)push).Gender != systemInfo.Gender); }
public override bool IsPushFiltered(SystemInfo systemInfo, Push push) { return(((ITime)push).ExpiryDate < systemInfo.Time); }