コード例 #1
0
 private bool ConsolidatingFilter(ICurrentEventInfo message)
 {
     // Remove any matching previous
     messageList.RemoveAll(evt => evt.Equals(message));
     messageList.AddLast(message);
     return(true);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 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);
 }
コード例 #4
0
            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)));
            }