/// <summary> /// Removes all extension objects from this collection and moves them to a new collection. /// </summary> /// <param name="from">The extension collection from which to remove the extensions.</param> /// <param name="to">The extension collection to which to add the extensions.</param> public static void MoveAllExtensionsTo(this IExtensionCollection from, IExtensionCollection to) { var list = from.ToList(); from.Clear(); to.AddRange(list); }