/// <summary> /// Initializes the matrix container. /// </summary> /// <param name="matrixContainer">The matrix container.</param> protected void InitializeMatrixContainer(MatrixContainer <TKey, TContainer, TValue> matrixContainer) { if (matrixContainer != null) { _valueCapacity = matrixContainer._valueCapacity; _valueComparer = matrixContainer._valueComparer; if (matrixContainer.HasItem()) { foreach (var one in matrixContainer) { Add(one.Key, NewContainer(_valueComparer, _valueCapacity, one.Value)); } } } }
/// <summary> /// Initializes a new instance of the <see cref="MatrixList{TKey, TValue}" /> class. /// </summary> /// <param name="matrixContainer">The matrix container.</param> /// <param name="comparer">The comparer.</param> protected MatrixContainer(MatrixContainer <TKey, TContainer, TValue> matrixContainer, IEqualityComparer <TKey> comparer) : base(comparer) { InitializeMatrixContainer(matrixContainer); }
/// <summary> /// Initializes a new instance of the <see cref="MatrixContainer{TKey, TContainer, TValue}"/> class. /// </summary> /// <param name="matrixContainer">The matrix container.</param> protected MatrixContainer(MatrixContainer <TKey, TContainer, TValue> matrixContainer) : base() { InitializeMatrixContainer(matrixContainer); }