Beispiel #1
0
        /// <summary>
        /// Handler called for element that has been changed.
        /// </summary>
        /// <param name="node">Affected element node.</param>
        private void onChange(ElementNode node)
        {
            var fn = node.Element as CodeFunction;

            if (fn == null)
            {
                onRemove(node);
                onAdd(node);
            }
            else
            {
                var fullnames = node.GetTag("Names") as IEnumerable <string>;
                if (fullnames == null)
                {
                    fullnames = GetFullNames(node.Element);
                    node.SetTag("Names", fullnames);
                }

                if (node == null)
                {
                    return;
                }

                foreach (var fullname in fullnames)
                {
                    //code change within method
                    ReportInvalidation(fullname);
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Handler called for element that has been removed.
        /// </summary>
        /// <param name="node">Affected element node.</param>
        private void onRemove(ElementNode node)
        {
            var fullnames = node.GetTag("Names") as IEnumerable <string>;

            if (fullnames == null)
            {
                return;
            }

            foreach (var fullname in fullnames)
            {
                ReportInvalidation(fullname);
                ComponentRemoveDiscovered(fullname);
            }
        }