private void _RegisterViewLayerByView(IViewLayer layer) { var view = layer.GetView(); if (!_viewLayersByView.ContainsKey(view)) { _viewLayersByView.Add(view, new List <IViewLayer>()); } _viewLayersByView[view].Add(layer); }
public void Init() { _aHomeViewLayer = Substitute.For <IViewLayer>(); _aHomeViewLayer.GetView().Returns(View.Home); _anotherHomeViewLayer = Substitute.For <IViewLayer>(); _anotherHomeViewLayer.GetView().Returns(View.Home); _aLobbyViewLayer = Substitute.For <IViewLayer>(); _aLobbyViewLayer.GetView().Returns(View.Lobby); var allViewLayers = new List <IViewLayer> { _aHomeViewLayer, _anotherHomeViewLayer, _aLobbyViewLayer }; _viewManager = new ViewManager(allViewLayers, Substitute.For <IAnalyticsSubmitter>()); }