// *********************************************************************** // Assembly : OpenAuth.Infrastructure // Author : yubaolee // Created : 05-23-2015 // // Last Modified By : yubaolee // Last Modified On : 05-23-2015 // *********************************************************************** // // Copyright (c) Microsoft. All rights reserved. // // 两个相同结构List之间的复制 // *********************************************************************** using System; using System.Collections.Generic; using System.Linq; namespace OpenAuth.Infrastructure { static class ListExtension { public static IList Clone(this IList listToClone) where T : ICloneable { return listToClone.Select(item => (T)item.Clone()).ToList(); } } }