Пример #1
0
        /// <summary>
        /// Makes a new set and registers it for updating membership later.
        /// </summary>
        /// <returns>An enumerable list of entitySet, that will update automatically.</returns>
        public EntitySet CreateSet(EntitySet.IncludeInSet predicate)
        {
            var entitySet = new EntitySet(predicate);

            _entitySets.Add(entitySet);
            foreach (var entity in _entities)
            {
                if (!entitySet.Matches(entity))
                {
                    continue;
                }
                entitySet.Add(entity);
            }
            return(entitySet);
        }
Пример #2
0
 /// <summary>
 /// Returns all entities that match the predicate.
 /// </summary>
 /// <returns>An enumerable list of entities, that will update automatically.</returns>
 public EntitySet CreateSet(EntitySet.IncludeInSet predicate)
 {
     return(_setManager.CreateSet(predicate));
 }
Пример #3
0
 public EntitySet CreateSet(EntitySet.IncludeInSet predicate)
 {
     return(new EntitySet(e => false));
 }