コード例 #1
0
        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++;
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 public void AcceptUnsupportedCommand(UnsupportedCommand unsupportedCommand, PrintContext parameter)
 {
     // do nothing; otherwise we'd probably spam the command line
 }
コード例 #4
0
 public virtual void AcceptUnsupportedCommand(UnsupportedCommand unsupportedCommand, T parameter)
 {
     // intentionally left blank
 }
コード例 #5
0
 public UnsupportedNode(UnsupportedCommand unsupportedCommand)
 {
     _unsupportedCommand = unsupportedCommand;
 }