public AntSettingsNodesManager([NotNull] IAntSettingsNodeFactory antSettingsNodeFactory,
                                       [NotNull] ILinesSourceManager linesSourceManager,
                                       [NotNull] ILinesToNodesConverter linesToNodesConverter)
        {
            m_AntSettingsNodeFactory = antSettingsNodeFactory;
            m_LinesSourceManager = linesSourceManager;
            m_LinesToNodesConverter = linesToNodesConverter;

            Nodes = new IAntSettingsNode[0];
        }
        private static void AssertCreatedNodes(IAntSettingsNode nodeOne,
                                               IAntSettingsNode[] actual)
        {
            Assert.NotNull(nodeOne,
                           "0. node missing");
            Assert.AreEqual(0,
                            nodeOne.Id,
                            "nodeOne.Id");
            Assert.AreEqual("Line 0",
                            nodeOne.Description,
                            "nodeOne.Description");

            IAntSettingsNode nodeTwo = actual.Skip(1).First();

            Assert.NotNull(nodeTwo,
                           "1. node missing");
            Assert.AreEqual(1,
                            nodeTwo.Id,
                            "nodeTwo.Id");
            Assert.AreEqual("Line 0 (Reverse)",
                            nodeTwo.Description,
                            "nodeOne.Description");

            IAntSettingsNode nodeThree = actual.Skip(2).First();

            Assert.NotNull(nodeThree,
                           "2. node missing");
            Assert.AreEqual(2,
                            nodeThree.Id,
                            "nodeThree.Id");
            Assert.AreEqual("Line 1",
                            nodeThree.Description,
                            "nodeOne.Description");

            IAntSettingsNode nodeFour = actual.Skip(3).First();

            Assert.NotNull(nodeFour,
                           "3. node missing");
            Assert.AreEqual(3,
                            nodeFour.Id,
                            "nodeTwo.Id");
            Assert.AreEqual("Line 1 (Reverse)",
                            nodeFour.Description,
                            "nodeOne.Description");
        }
        public AntSettingsViewModel([NotNull] ISelkieLogger logger,
                                    [NotNull] ISelkieInMemoryBus bus,
                                    [NotNull] IApplicationDispatcher dispatcher,
                                    [NotNull] ICommandManager commandManager,
                                    [UsedImplicitly] IAntSettingsModel model)
        {
            m_Bus = bus;
            m_Dispatcher = dispatcher;
            m_CommandManager = commandManager;
            Nodes = new IAntSettingsNode[0];

            string subscriptionId = GetType().ToString();

            m_Bus.SubscribeAsync <AntSettingsModelChangedMessage>(subscriptionId,
                                                                  AntSettingsModelChangedHandler);

            m_Bus.PublishAsync(new AntSettingsModelRequestMessage());
        }
 public void Release(IAntSettingsNode node)
 {
 }
 public LinesToNodesConverter()
 {
     Nodes = new IAntSettingsNode[0];
 }