예제 #1
0
        public static EnumDataEntityCollection GetCachedCollection()
        {
            if (cachedCollection == null)
            {
                cachedCollection = Generate();
            }

            return(cachedCollection);
        }
예제 #2
0
        public static EnumDataEntityCollection Generate()
        {
            EnumDataEntityCollection set = new EnumDataEntityCollection();
            Random rnd = new Random();

            for (int i = 0; i < 999; i++)
            {
                set.Add(new EnumDataEntity()
                {
                    ID = i.ToString(), Result = (SomeEnum)(i % 5)
                });
            }

            return(set);
        }