The Labs \ Source Viewer \ SSCLI \ System.Security.Util \ TokenBasedSetEnumerator

  1. // ==++==
  2. //
  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. //
  14. // ==--==
  15. // TokenBasedSetEnumerator.cs
  16. //
  17. namespace System.Security.Util
  18. {
  19.     using System;
  20.     using System.Collections;
  21.    
  22.     internal struct TokenBasedSetEnumerator
  23.     {
  24.         public object Current;
  25.         public int Index;
  26.        
  27.         private TokenBasedSet _tb;
  28.        
  29.         public bool MoveNext()
  30.         {
  31.             return _tb != null ? _tb.MoveNext(ref this) : false;
  32.         }
  33.        
  34.         public void Reset()
  35.         {
  36.             Index = -1;
  37.             Current = null;
  38.         }
  39.        
  40.         public TokenBasedSetEnumerator(TokenBasedSet tb)
  41.         {
  42.             Index = -1;
  43.             Current = null;
  44.             _tb = tb;
  45.         }
  46.     }
  47. }

Developer Fusion