示例#1
0
        /// <summary>
        /// Loads the content of an editing event.
        /// </summary>
        /// <param name="editDeserializer">The mechanism for reading back content.</param>
        /// <returns>The created editing event object</returns>
        static internal Change Deserialize(EditDeserializer editDeserializer)
        {
            Change result = editDeserializer.ReadPersistent <Change>(DataField.Edit);

            // Note that calculated geometry is NOT defined at this stage. That happens
            // when the model is asked to index the data.

            // Associate referenced features with the edit
            result.AddReferences();

            // If we're dealing with an update, exchange update items. Do this NOW (rather than at it's natural
            // spot in the editing sequence) so as to avoid repeated calculation loops during loading. When an
            // update is applied during regular editing work, we have to rework the calculation sequence and
            // rollforward all the subsequent edits. So we'd have to do that for every update. By applying changes
            // now, we'll end up doing a single calculation loop.

            UpdateOperation upo = (result as UpdateOperation);

            if (upo != null)
            {
                upo.ApplyChanges();
            }

            return(result);
        }