Beispiel #1
0
        public static void Subscribe(LogCategory category, RecieveLogMessage callback, object contextFilter)
        {
            if (m_subscribers.Find(x => x.Category == category && x.Callback == callback && x.ContextFilter.Equals(contextFilter)) != null)
            {
                WLog.Warning(LogCategory.None, null, "Subscriber list already contains callback: {0}!", callback);
            }

            MessageSubscriber subscriber = new MessageSubscriber(category, callback, contextFilter);

            m_subscribers.Add(subscriber);
        }
Beispiel #2
0
 public MessageSubscriber(LogCategory category, RecieveLogMessage callback, object contextFilter)
 {
     Category      = category;
     Callback      = callback;
     ContextFilter = contextFilter;
 }