/// <summary> /// Retrieve the target enumerator wrapped in <paramref name="proxies"/>. /// </summary> /// <typeparam name="T"> /// Type of the enumerator elements. /// </typeparam> /// <param name="proxies"> /// An proxy enumerator returned by <see cref="GetProxy{T}(IEnumerator{T})"/>. /// </param> /// <returns> /// The target enumerator instance wrapped by <paramref name="proxies"/>, /// or <paramref name="proxies"/> itself if it is actually not a proxy. /// </returns> public static IEnumerator <T> GetTarget <T>(IEnumerator <T> proxies) where T : class { return(EnumeratorProxy <T> .GetTarget(proxies)); }
/// <summary> /// Get an enumerator of proxies of the given <paramref name="targets"/>. /// </summary> /// <typeparam name="T"> /// Type of the enumerator elements. /// </typeparam> /// <param name="targets"> /// An enumerator of original target objects. /// </param> /// <returns> /// An enumerator of proxies of targets or targets itself if it is already /// an enumerator of proxies. /// </returns> public static IEnumerator <T> GetProxy <T>(IEnumerator <T> targets) where T : class { return(EnumeratorProxy <T> .GetProxy(targets)); }