protected EntityIndexBase(
     string name,
     IEntityGroup <TEntity> group,
     IKeyValueGetter <TEntity, TKey> keyValueGetter)
 {
     Name           = name;
     KeyValueGetter = keyValueGetter;
     group.AddListener(this);
     Group = group;
 }
 public SortedEntityRelationship(string name,
                                 IEntityGroup <TEntity> referencingGroup,
                                 IEntityGroup <TEntity> referencedGroup,
                                 IKeyValueGetter <TEntity, int> keyValueGetter,
                                 IKeyValueGetter <TEntity, TKey> sortValueGetter,
                                 Action <TEntity, TEntity, Component> handleReferencedDeleted,
                                 bool referencedKeepAlive,
                                 bool referencingKeepAlive,
                                 IComparer <TKey> comparer)
     : base(
         name,
         referencingGroup,
         referencedGroup,
         keyValueGetter,
         handleReferencedDeleted,
         referencedKeepAlive,
         referencingKeepAlive)
 {
     _sortValueGetter = sortValueGetter;
     _comparer        = comparer;
     referencedGroup.AddListener(new ReferencedGroupListener(this));
 }