Пример #1
0
        public XCIList <I> GetInstanceList()
        {
            var list = new XCIList <I>();

            foreach (var item in InstanceContainer)
            {
                list.Add(item.Value);
            }
            return(list);
        }
Пример #2
0
        public XCIList <T> Copy()
        {
            XCIList <T> list = new XCIList <T>();

            foreach (var item in this)
            {
                list.Add(item);
            }
            return(list);
        }
Пример #3
0
 /// <summary>
 /// 添加实现对象
 /// </summary>
 /// <param name="configs">配置列表</param>
 public void AddOrUpdate(XCIList <ConfigEntity> configs)
 {
     if (configs != null)
     {
         for (int index = 0; index < configs.Count; index++)
         {
             ConfigEntity config = configs[index];
             AddOrUpdate(config);
         }
     }
 }
Пример #4
0
        public XCIList <T> Where(Func <T, bool> predicate)
        {
            XCIList <T> list = new XCIList <T>();

            foreach (var item in this)
            {
                if (predicate(item))
                {
                    list.Add(item);
                }
            }
            return(list);
        }