public void Count(UnsupportedCommand unsupportedCommand) { string elementName; if (unsupportedCommand.IsTextEncoding) { elementName = unsupportedCommand.ElementName; } else { elementName = string.Format("Element Class={0}, Id={1}", unsupportedCommand.ElementClass, unsupportedCommand.ElementId); } var matchingElement = Nodes.OfType <UnsupportedCountNode>().FirstOrDefault(u => u.ElementName == elementName); if (matchingElement == null) { matchingElement = new UnsupportedCountNode(elementName); Nodes.Add(matchingElement); } matchingElement.Count++; }
public void AddUnsupportedNode(UnsupportedCommand unsupportedCommand) { var counterNode = RootLevel.OfType <UnsupportedCounter>().FirstOrDefault(); if (counterNode == null) { counterNode = new UnsupportedCounter(); RootLevel.Add(counterNode); } counterNode.Count(unsupportedCommand); var level = CurrentLevelNodes; var container = level.OfType <UnsupportedContainer>().FirstOrDefault(); if (container == null) { container = new UnsupportedContainer(); level.Insert(0, container); } container.Add(new UnsupportedNode(unsupportedCommand)); }
public void AcceptUnsupportedCommand(UnsupportedCommand unsupportedCommand, PrintContext parameter) { // do nothing; otherwise we'd probably spam the command line }
public virtual void AcceptUnsupportedCommand(UnsupportedCommand unsupportedCommand, T parameter) { // intentionally left blank }
public UnsupportedNode(UnsupportedCommand unsupportedCommand) { _unsupportedCommand = unsupportedCommand; }