Ejemplo n.º 1
0
        [SetUp] public void SetUp()
        {
            _nodeCollection  = new JetListViewNodeCollection(null);
            _groupProvider   = new MockGroupProvider();
            _groupCollection = new NodeGroupCollection(_nodeCollection, _groupProvider);

            _selection                   = new MultipleSelectionModel(_nodeCollection);
            _rowListRenderer             = new RowListRenderer(_nodeCollection, _selection);
            _rowRenderer                 = new MockRowRenderer();
            _rowRenderer.RowHeight       = 20;
            _rowListRenderer.RowRenderer = _rowRenderer;

            _groupRenderer = new MockGroupRenderer(10);
            _rowListRenderer.GroupRenderer       = _groupRenderer;
            _rowListRenderer.NodeGroupCollection = _groupCollection;

            _lastEventGroup       = null;
            _lastInvalidateStartY = -1;
        }
Ejemplo n.º 2
0
		private void BuildNodeGroups(RelayNodeConfig relayNodeConfig, Dictionary<string, Dictionary<string, MessageQueue>> errorQueues)
		{
			RelayNodeMapping relayNodeMapping = relayNodeConfig.RelayNodeMapping;
			if (relayNodeMapping != null)
			{
				if (relayNodeMapping.Validate())
				{
                    NodeGroupCollection nodeGroups = new NodeGroupCollection(relayNodeMapping.RelayNodeGroups, relayNodeConfig, ForwardingConfig);

					NodeGroups = nodeGroups;
					RelayNodeGroupDefinition myGroupDefinition = Config.GetMyGroup();
					if (myGroupDefinition != null && NodeGroups.Contains(myGroupDefinition.Name))
					{
						MyNodeGroup = NodeGroups[myGroupDefinition.Name];
					}
					else
					{
						MyNodeGroup = null;
					}

					if (errorQueues != null)
					{
						nodeGroups.PopulateQueues(errorQueues, true);
					}
				}
				else
				{
					if (_log.IsErrorEnabled)
						_log.Error("Forwarder not loading invalid config.");
					NodeGroups = new NodeGroupCollection();
				}
			}
			else
			{
				NodeGroups = new NodeGroupCollection();
			}
		}