Ejemplo n.º 1
0
 private void LockContext(XmlNode node)
 {
     if (node != null)
     {
         if (!_commenter.ContainsComment(node))
         {
             _commenter.CreateComment(node, "SpotCheck Context");
         }
         if (_locker.IsLocked(node))
         {
             // if its not a spotchecker lock, mark, so it won't be removed during cleanup
             string content;
             if (!_commenter.ContainsComment(node, out content) || content != "Lock Protected")
             {
                 _commenter.CreateComment(node, "Lock Protected");
             }
         }
         else
         {
             _locker.LockSegment(node);
         }
     }
 }