/// <summary> /// Checks that a frame is correctly constructed. /// </summary> /// <param name="nodeType">Type of the node this frame can describe.</param> /// <param name="nodeTemplateTable">Table of templates with all frames.</param> /// <param name="commentFrameCount">Number of comment frames found so far.</param> public override bool IsValid(Type nodeType, FrameTemplateReadOnlyDictionary nodeTemplateTable, ref int commentFrameCount) { bool IsValid = true; IsValid &= base.IsValid(nodeType, nodeTemplateTable, ref commentFrameCount); IsValid &= Visibility == null || Visibility.IsValid(nodeType); IsValid &= BlockVisibility == null || BlockVisibility.IsValid(nodeType); Debug.Assert(IsValid); return(IsValid); }
/// <summary> /// Checks that a frame is correctly constructed. /// </summary> /// <param name="nodeType">Type of the node this frame can describe.</param> /// <param name="nodeTemplateTable">Table of templates with all frames.</param> /// <param name="commentFrameCount">Number of comment frames found so far.</param> public override bool IsValid(Type nodeType, IFrameTemplateReadOnlyDictionary nodeTemplateTable, ref int commentFrameCount) { bool IsValid = true; IsValid &= base.IsValid(nodeType, nodeTemplateTable, ref commentFrameCount); IsValid &= Visibility == null || Visibility.IsValid(nodeType); IsValid &= BlockVisibility == null || BlockVisibility.IsValid(nodeType); #if DEBUG // For code coverage purpose. CollectSelectors(new Dictionary <string, IFocusFrameSelectorList>()); #endif Debug.Assert(IsValid); return(IsValid); }