Пример #1
0
        /// <summary>
        /// Touches this feature for rollforward preview.
        /// </summary>
        /// <param name="afterOp">The edit causing the change (only edits that were performed after this
        /// edit are considered relevant).</param>
        /// <remarks>The <see cref="PointFeature"/> class overrides</remarks>
        internal virtual void Touch(Operation afterOp)
        {
            if (m_Creator.IsAfter(afterOp))
            {
                m_Creator.SetTouch();
            }

            if (m_References != null)
            {
                foreach (IFeatureDependent fd in m_References)
                {
                    if (fd is Operation)
                    {
                        Operation depOp = (fd as Operation);
                        if (depOp.IsAfter(afterOp))
                        {
                            depOp.SetTouch();
                        }
                    }
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Obtains dependent edits within this session.
        /// </summary>
        /// <param name="deps">The dependent edits.</param>
        /// <param name="startOp">The first operation that should be touched (specify null
        /// for all edits in this session).</param>
        internal void Touch(List <Operation> deps, Operation startOp)
        {
            // If a starting op has been specified, process only from there
            if (startOp != null)
            {
                int opIndex = m_Operations.FindIndex(o => object.ReferenceEquals(o, startOp));
                if (opIndex < 0)
                {
                    throw new Exception("Cannot locate starting edit within session");
                }

                try
                {
                    // Touch the starting edit
                    startOp.SetTouch();

                    // Process the edits within this session, starting with the specified edit
                    for (int i = opIndex; i < m_Operations.Count; i++)
                    {
                        m_Operations[i].Touch(deps);
                    }
                }

                finally
                {
                    startOp.UnTouch();
                }
            }
            else
            {
                // Process all edits performed within this session
                foreach (Operation op in m_Operations)
                {
                    op.Touch(deps);
                }
            }
        }
Пример #3
0
        /// <summary>
        /// Obtains dependent edits within this session.
        /// </summary>
        /// <param name="deps">The dependent edits.</param>
        /// <param name="startOp">The first operation that should be touched (specify null
        /// for all edits in this session).</param>
        internal void Touch(List<Operation> deps, Operation startOp)
        {
            // If a starting op has been specified, process only from there
            if (startOp != null)
            {
                int opIndex = m_Operations.FindIndex(o => object.ReferenceEquals(o, startOp));
                if (opIndex < 0)
                    throw new Exception("Cannot locate starting edit within session");

                try
                {
                    // Touch the starting edit
                    startOp.SetTouch();

                    // Process the edits within this session, starting with the specified edit
                    for (int i = opIndex; i < m_Operations.Count; i++)
                        m_Operations[i].Touch(deps);
                }

                finally
                {
                    startOp.UnTouch();
                }
            }
            else
            {
                // Process all edits performed within this session
                foreach (Operation op in m_Operations)
                    op.Touch(deps);
            }
        }