Exemplo n.º 1
0
        public void OnBeforeObjectRegistration(ReadOnlyCollection <ObjectID> loadedObjectIDs)
        {
            ArgumentUtility.CheckNotNull("loadedObjectIDs", loadedObjectIDs);

            // The ObjectsLoadingEvent is allowed to cancel; therefore, we execute it before indicating that we're starting to register objects.
            // _eventSink.RaiseObjectsLoadingEvent (loadedObjectIDs);

            _hierarchyManager.OnBeforeObjectRegistration(loadedObjectIDs);
            try
            {
                _eventSink.RaiseObjectsLoadingEvent(loadedObjectIDs);
            }
            catch
            {
                _hierarchyManager.OnAfterObjectRegistration(loadedObjectIDs);
                throw;
            }
        }