private bool ConsolidatingFilter(ICurrentEventInfo message) { // Remove any matching previous messageList.RemoveAll(evt => evt.Equals(message)); messageList.AddLast(message); return(true); }
public bool Equals(ICurrentEventInfo other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (GetHashCode() != other.GetHashCode()) { return(false); } if (Source != other.Source) { return(false); } if (Message.Name != other.Message.Name) { return(false); } if (!IdentArguments.SequenceEqual(other.IdentArguments)) { return(false); } return(true); }
public bool CheckPrereq(ICurrentEventInfo info) { if (!attr.Scenes.IsLoaded()) { return(false); } // ReSharper disable once InvokeAsExtensionMethod SourcePart can be null if (!PartUtils.RelationTest(info.SourcePart, TargetPart, attr.Relations)) { return(false); } return(true); }
public bool CheckPrereq(ICurrentEventInfo info) { if (source != null && source != info.Source) { return(false); } if (part != null && part != info.SourcePart) { return(false); } if (messages.Count == 0) { return(true); } return(info.Message.Any(message => !messages.Contains(message.Name))); }