// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. using System; using System.Collections.Generic; namespace Microsoft.AspNet.Razor.Test.Utils { public static class EnumerableUtils { public static void RunPairwise(IEnumerable left, IEnumerable right, Action action) { IEnumerator leftEnum = left.GetEnumerator(); IEnumerator rightEnum = right.GetEnumerator(); while (leftEnum.MoveNext() && rightEnum.MoveNext()) { action(leftEnum.Current, rightEnum.Current); } } } }