public CollectionEndPointDataManager(RelationEndPointID endPointID, ICollectionEndPointChangeDetectionStrategy changeDetectionStrategy)
        {
            ArgumentUtility.CheckNotNull("endPointID", endPointID);
            ArgumentUtility.CheckNotNull("changeDetectionStrategy", changeDetectionStrategy);

            _endPointID = endPointID;
            _changeDetectionStrategy = changeDetectionStrategy;

            var wrappedData = new DomainObjectCollectionData();

            _changeCachingCollectionData = new ChangeCachingCollectionDataDecorator(wrappedData);

            _originalOppositeEndPoints    = new HashSet <IRealObjectEndPoint>();
            _originalItemsWithoutEndPoint = new HashSet <DomainObject>();
            _currentOppositeEndPoints     = new Dictionary <ObjectID, IRealObjectEndPoint>();
        }
        // ReSharper disable UnusedMember.Local
        private CollectionEndPointDataManager(FlattenedDeserializationInfo info)
        {
            ArgumentUtility.CheckNotNull("info", info);

            _endPointID = info.GetValueForHandle <RelationEndPointID>();
            _changeDetectionStrategy = info.GetValueForHandle <ICollectionEndPointChangeDetectionStrategy>();

            _changeCachingCollectionData = info.GetValue <ChangeCachingCollectionDataDecorator>();

            _originalOppositeEndPoints = new HashSet <IRealObjectEndPoint>();
            info.FillCollection(_originalOppositeEndPoints);

            _originalItemsWithoutEndPoint = new HashSet <DomainObject>();
            info.FillCollection(_originalItemsWithoutEndPoint);

            var currentOppositeEndPoints = new List <IRealObjectEndPoint>();

            info.FillCollection(currentOppositeEndPoints);
            _currentOppositeEndPoints = currentOppositeEndPoints.ToDictionary(ep => ep.ObjectID);
        }