Treefrog.Render.Layers.GroupLayer.GroupLayer C# (CSharp) Method

GroupLayer() public method

public GroupLayer ( GroupLayerPresenter model ) : System
model Treefrog.Presentation.Layers.GroupLayerPresenter
return System
        public GroupLayer(GroupLayerPresenter model)
            : base(model)
        {
            _adapter = new ObservableCollectionAdapter<LayerPresenter, CanvasLayer>(layer => {
                return LayerFactory.Default.Create(layer);
            });
            _adapter.Dependent.CollectionChanged += DependentCollectionChanged;

            if (model != null)
                _adapter.Primary = model.Layers;

            _dependent = new ReadOnlyObservableCollection<CanvasLayer>(_adapter.Dependent);
        }