Пример #1
0
        public CodeRootMapNode(CodeRootMap parentTree, CodeRootMapNode parentNode)
        {
            parentCRMTree = parentTree;
            parentCRMNode = parentNode;
            parentCRMNode.children.Add(this);

            parentCRMTree.AddNode(this);
        }
Пример #2
0
        /// <summary>
        /// Sets up the object before the diff is performed. Any classes inheriting from this one that providing custom diff methods (PerformDiff calls this itself,
        /// so you do not need to call it for PerformDiffInternal) should call this first.
        /// </summary>
        protected void SetupPerformDiff()
        {
            if (userFile.HasContents == false && prevgenFile.HasContents == false && newgenFile.HasContents == false)
            {
                throw new InvalidOperationException("Cannot perform a diff if there are no files! ( " + RelativeFilePath + ")");
            }

            if (string.IsNullOrEmpty(RelativeFilePath))
            {
                throw new InvalidOperationException("The relative file path of the FileInformation object has not been set, so we cannot perform a diff.");
            }

            if (diffCodeRootMap == null)
            {
                diffCodeRootMap = new CodeRootMap();
            }
        }