public GameImageMatchAction(Guid id, GameImageMatchActionType type, string splitName, IList <SplitComparisonImage> comparisonImages) { Id = id; Type = type; SplitName = splitName; ComparisonImages = comparisonImages; }
public bool TryGet(GameImageMatchActionType type, out IReadOnlyList <GameImageMatchAction> actions) { lock (repoLock) { actions = this.loadedActions.Where(x => (type & x.Type) == x.Type).ToList(); return(actions.Count > 0); } }
private bool GetAndMatch(IMaskedGameImage gameImage, GameImageMatchActionType type, string splitName = null) { if (actionRepository.TryGet(type, out var split)) { if (!string.IsNullOrEmpty(splitName)) { split = split.Where(x => x.SplitName == splitName).ToList(); if (split.Count == 0) { return(false); } } if (actionMatcher.AnyMatch(gameImage, split)) { return(true); } } return(false); }
private bool GetAndMatchSplit(IMaskedGameImage gameImage, GameImageMatchActionType type) { return(GetAndMatch(gameImage, type, this.controller.CurrentSplitName)); }