示例#1
0
        /// <summary>
        /// Adds references to existing features referenced by this observation.
        /// <para/>
        /// This should be called by implementations of <c>Operation.AddReferences</c>
        /// (for each instance of Observation that the operation involves). This ensures
        /// that the features utilized by observations are cross-referenced to the editing
        /// operations that depend on them.
        /// </summary>
        /// <param name="op">The operation that makes use of this observation</param>
        internal void AddReferences(Operation op)
        {
            Feature[] features = GetReferences();

            foreach (Feature f in features)
                f.AddOp(op);
        }
示例#2
0
 /// <summary>
 /// Performs actions when the operation that uses this observation is marked
 /// for deletion as part of its rollback function. This cuts any reference from any
 /// previously existing feature that was cross-referenced to the operation (see
 /// calls made to AddOp).
 /// </summary>
 /// <param name="op">The operation that makes use of this observation.</param>
 internal abstract void OnRollback(Operation op);