Microsoft.Cci.InternFactory.GetMatrixTypeReferenceInternId C# (CSharp) Method

GetMatrixTypeReferenceInternId() private method

private GetMatrixTypeReferenceInternId ( ITypeReference elementTypeReference, int rank, IEnumerable sizes, IEnumerable lowerBounds ) : uint
elementTypeReference ITypeReference
rank int
sizes IEnumerable
lowerBounds IEnumerable
return uint
    uint GetMatrixTypeReferenceInternId(ITypeReference elementTypeReference, int rank, IEnumerable<ulong> sizes, IEnumerable<int> lowerBounds) {
      Contract.Requires(elementTypeReference != null);
      Contract.Requires(sizes != null);
      Contract.Requires(lowerBounds != null);

      uint elementTypeReferenceInternId = this.GetTypeReferenceInternId(elementTypeReference);
      foreach (MatrixTypeStore matrixTypeStore in this.MatrixTypeHashtable.GetValuesFor(elementTypeReferenceInternId)) {
        if (matrixTypeStore.Rank == rank && IteratorHelper.EnumerablesAreEqual<ulong>(matrixTypeStore.Sizes, sizes) && IteratorHelper.EnumerablesAreEqual<int>(matrixTypeStore.LowerBounds, lowerBounds))
          return matrixTypeStore.InternedId;
      }
      MatrixTypeStore matrixTypeStore1 = new MatrixTypeStore(rank, new List<int>(lowerBounds).ToArray(), new List<ulong>(sizes).ToArray(), this.CurrentTypeInternValue++);
      this.MatrixTypeHashtable.Add(elementTypeReferenceInternId, matrixTypeStore1);
      return matrixTypeStore1.InternedId;
    }