Пример #1
0
 protected virtual void filter_FilterUpdatedEvent(TracerFilter filter)
 {
     if (FilterUpdateEvent != null)
     {
         FilterUpdateEvent(this);
     }
 }
Пример #2
0
 /// <summary>
 /// Add a new tracer filter to tracer.
 /// Make sure this is correct, since once filter in place, items will not be passed to sinks at all.
 /// </summary>
 public bool Add(TracerFilter filter)
 {
     lock (this)
     {
         return(_filters.Add(filter));
     }
 }
Пример #3
0
        protected override void filter_FilterUpdatedEvent(TracerFilter filter)
        {
            // This causes the filtering to be executed on the event raising thread.
            GeneralHelper.FireAndForget(ReFilterItems);

            base.filter_FilterUpdatedEvent(filter);
        }
Пример #4
0
 /// <summary>
 /// Add a new tracer filter to tracer.
 /// Make sure this is correct, since once filter in place, items will not be passed to sinks at all.
 /// </summary>
 public bool Add(TracerFilter filter)
 {
     filter.Initialize(this);
     lock (this)
     {
         return(_filters.Add(filter));
     }
 }
Пример #5
0
        /// <summary>
        ///
        /// </summary>
        public bool RemoteFilter(TracerFilter filter)
        {
            lock (this)
            {
                if (_filters.Remove(filter))
                {
                    filter.FilterUpdatedEvent -= new TracerFilter.FilterUpdatedDelegate(filter_FilterUpdatedEvent);
                    return(true);
                }
            }

            return(false);
        }
Пример #6
0
        /// <summary>
        /// Add sink specific filter.
        /// It is up to the sinks implementation to how the filter will be used.
        /// </summary>
        public bool AddFilter(TracerFilter filter)
        {
            lock (this)
            {
                if (_filters.Add(filter))
                {
                    filter.FilterUpdatedEvent += new TracerFilter.FilterUpdatedDelegate(filter_FilterUpdatedEvent);
                    return(true);
                }
            }

            return(false);
        }
        /// <summary>
        /// Obtain filtering data from other filter.
        /// </summary>
        public override void CopyDataFrom(TracerFilter otherFilter)
        {
            StringTracerFilter filter = otherFilter as StringTracerFilter;

            this._positiveFilterString = filter.PositiveFilterString;
            if (filter.NegativeFilterStrings == null)
            {
                this._negativeFilterStrings = null;
            }
            else
            {
                if (filter.NegativeFilterStrings != null)
                {
                    this._negativeFilterStrings = new List <string>(filter.NegativeFilterStrings);
                }
                else
                {
                    this._negativeFilterStrings = null;
                }
            }

            RaiseFilterUpdatedEvent(false);
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="otherFilter"></param>
 public virtual void CopyDataFrom(TracerFilter otherFilter)
 {
 }
Пример #9
0
 /// <summary>
 /// Possible NON UI thread.
 /// </summary>
 void _filter_FilterUpdatedEvent(TracerFilter filter)
 {
     WinFormsHelper.BeginManagedInvoke(this, new GeneralHelper.DefaultDelegate(UpdateUI));
 }
 protected virtual void filter_FilterUpdatedEvent(TracerFilter filter)
 {
     if (FilterUpdateEvent != null)
     {
         FilterUpdateEvent(this);
     }
 }
        /// <summary>
        /// Add sink specific filter.
        /// It is up to the sinks implementation to how the filter will be used.
        /// </summary>
        public bool AddFilter(TracerFilter filter)
        {
            lock (this)
            {
                if (_filters.Add(filter))
                {
                    filter.FilterUpdatedEvent += new TracerFilter.FilterUpdatedDelegate(filter_FilterUpdatedEvent);
                    return true;
                }
            }

            return false;
        }
        /// <summary>
        /// Obtain filtering data from other filter.
        /// </summary>
        public override void CopyDataFrom(TracerFilter otherFilter)
        {
            StringTracerFilter filter = otherFilter as StringTracerFilter;
            this._positiveFilterString = filter.PositiveFilterString;
            if (filter.NegativeFilterStrings == null)
            {
                this._negativeFilterStrings = null;
            }
            else
            {
                if (filter.NegativeFilterStrings != null)
                {
                    this._negativeFilterStrings = new List<string>(filter.NegativeFilterStrings);
                }
                else
                {
                    this._negativeFilterStrings = null;
                }
            }

            RaiseFilterUpdatedEvent(false);
        }
        /// <summary>
        /// 
        /// </summary>
        public bool RemoteFilter(TracerFilter filter)
        {
            lock (this)
            {
                if (_filters.Remove(filter))
                {
                    filter.FilterUpdatedEvent -= new TracerFilter.FilterUpdatedDelegate(filter_FilterUpdatedEvent);
                    return true;
                }
            }

            return false;
        }
Пример #14
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="otherFilter"></param>
 public virtual void CopyDataFrom(TracerFilter otherFilter)
 {
 }
Пример #15
0
 /// <summary>
 /// Add a new tracer filter to tracer.
 /// Make sure this is correct, since once filter in place, items will not be passed to sinks at all.
 /// </summary>
 public bool Add(TracerFilter filter)
 {
     lock (this)
     {
         return _filters.Add(filter);
     }
 }
 /// <summary>
 /// Possible NON UI thread.
 /// </summary>
 void _filter_FilterUpdatedEvent(TracerFilter filter)
 {
     WinFormsHelper.BeginManagedInvoke(this, new GeneralHelper.DefaultDelegate(UpdateUI));
 }
        protected override void filter_FilterUpdatedEvent(TracerFilter filter)
        {
            // This causes the filtering to be executed on the event raising thread.
            GeneralHelper.FireAndForget(ReFilterItems);

            base.filter_FilterUpdatedEvent(filter);
        }
Пример #18
0
 /// <summary>
 /// Add a new tracer filter to tracer.
 /// Make sure this is correct, since once filter in place, items will not be passed to sinks at all.
 /// </summary>
 public bool Add(TracerFilter filter)
 {
     filter.Initialize(this);
     lock (this)
     {
         return _filters.Add(filter);
     }
 }