The Labs \ Source Viewer \ SSCLI \ System.ComponentModel \ ContainerFilterService

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ContainerFilterService.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.ComponentModel
  16. {
  17.    
  18.     using System;
  19.     using System.ComponentModel;
  20.     using System.Security.Permissions;
  21.    
  22.     /// <devdoc>
  23.     /// The Container and NestedContainer classes will call GetService for ContainerFilterService
  24.     /// each time they need to construct a Components collection for return to a caller.
  25.     /// ContainerFilterService may return an updated collection of components. This allows
  26.     /// an external service to modify the view of components that are returned from a container.
  27.     /// </devdoc>
  28.     [HostProtection(SharedState = true)]
  29.     public abstract class ContainerFilterService
  30.     {
  31.        
  32.         /// <devdoc>
  33.         /// </devdoc>
  34.         protected ContainerFilterService()
  35.         {
  36.         }
  37.        
  38.         /// <devdoc>
  39.         /// Filters the components collection by optionally returning a new, modified collection.
  40.         /// The default implementation returns the input collection, thereby performing no filtering.
  41.         /// </devdoc>
  42.         public virtual ComponentCollection FilterComponents(ComponentCollection components)
  43.         {
  44.             return components;
  45.         }
  46.     }
  47. }

Developer Fusion