Microsoft.Cci.MetadataReaderHost.TryNextPermutation C# (CSharp) Method

TryNextPermutation() public method

Called by the metadata reader when it has unsucessfully tried to parse a custom attribute blob and it now needs to try a new permutation. Returns false if no more perumations are possible.
public TryNextPermutation ( ) : bool
return bool
    public bool TryNextPermutation() {
      bool allPermutationsHaveBeenTried = true;
      if (this.currentWildGuesses != null) {
        var keys = new List<uint>(this.currentWildGuesses.Keys);
        foreach (var key in keys) {
          var oldValue = this.currentWildGuesses[key];
          if (oldValue == 4)
            this.currentWildGuesses[key] = 1;
          else if (oldValue == 1)
            this.currentWildGuesses[key] = 2;
          else if (oldValue == 2)
            this.currentWildGuesses[key] = 8;
          else {
            this.currentWildGuesses[key] = 4;
            continue;
          }
          allPermutationsHaveBeenTried = false;
          break;
        }
      }
      if (allPermutationsHaveBeenTried && this.currentGoodGuesses != null) {
        if (this.currentWildGuesses == null) this.currentWildGuesses = new Dictionary<uint, byte>();
        foreach (var key in this.currentGoodGuesses.Keys) {
          allPermutationsHaveBeenTried = false;
          this.currentWildGuesses[key] = 4;
        }
        this.currentGoodGuesses = null;
      }
      return !allPermutationsHaveBeenTried;
    }