/// <summary> /// Adds the specified filter with the specified name at the beginning of this chain. /// </summary> /// <param name="name">the filter's name</param> /// <param name="filter">the filter to add</param> public void AddFirst(String name, IoFilter filter) { lock (_syncRoot) { Register(0, new EntryImpl(this, name, filter)); } }
/// <summary> /// Adds the specified filter with the specified name at the end of this chain. /// </summary> /// <param name="name">the filter's name</param> /// <param name="filter">the filter to add</param> public void AddLast(String name, IoFilter filter) { lock (_syncRoot) { Register(_entries.Count, new EntryImpl(this, name, filter)); } }
/// <summary> /// Replace the filter with the specified name with the specified new filter. /// </summary> /// <param name="name">the name of the filter to replace</param> /// <param name="newFilter">the new filter</param> /// <returns>the old filter</returns> public IoFilter Replace(String name, IoFilter newFilter) { lock (_syncRoot) { CheckBaseName(name); EntryImpl e = (EntryImpl)GetEntry(name); IoFilter oldFilter = e.Filter; e.Filter = newFilter; return(oldFilter); } }
/// <summary> /// Adds the specified filter with the specified name just after the filter whose name is /// <paramref name="baseName"/> in this chain. /// </summary> /// <param name="baseName">the targeted filter's name</param> /// <param name="name">the filter's name</param> /// <param name="filter">the filter to add</param> public void AddAfter(String baseName, String name, IoFilter filter) { lock (_syncRoot) { CheckBaseName(baseName); Int32 i = _entries.FindIndex(e => e.Name.Equals(baseName)); if (i >= 0) { Register(i + 1, new EntryImpl(this, name, filter)); } } }
/// <summary> /// </summary> public ReferenceCountingFilter(IoFilter filter) { _filter = filter; }
public ReferenceCountingFilter(IoFilter filter) { _filter = filter; }