修改扩展方法命名空间NewLife.Linq=>System.Ling,以及HashSet的命名空间,保持FX2/FX4的兼容
nnhy authored at 2013-10-24 21:43:45
595.00 B
X_NET20
#if !NET4
using System.Collections.Generic;
using System.Runtime;

namespace System.Linq
{
    internal class EmptyEnumerable<TElement>
    {
        private static TElement[] instance;
        public static IEnumerable<TElement> Instance
        {
            get
            {
                if (instance == null) instance = new TElement[0];

                return instance;
            }
        }
        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        public EmptyEnumerable() { }
    }
}
#endif