Esempio n. 1
0
        public virtual bool Filter(BaseObject @object, EventType eventType, string message)
        {
            if (this.excludeObjectTypes.Exists(o => @object.ObjectType == o))
                return false;

            if (this.excludeObjects.Exists(o => @object.ObjectID == o))
                return false;

            if (this.excludeEvents.Exists(e => e == eventType))
                return false;

            return true;
        }
Esempio n. 2
0
 public void RaiseEvent(BaseObject @object, EventType eventType, string message, params object[] args)
 {
     string formattedMessage = (args.Length == 0) ? message : string.Format(message, args);
     this.listeners.FindAll(l => l.Filter.Filter(@object, eventType, formattedMessage)).ForEach(l => l.WriteEvent(@object, eventType, formattedMessage));
 }