public ILayer AddChild(ILayerNode child) { if (child is INativeCocoaNode native) { AddSubview(native.View); return(new NativeLayer(this)); } else { Layer layer = new(child); AddSubview(layer); return(layer); } }
ILayer ILayer.AddChild(ILayerNode child) { Layer layer; if (child is InputNode input) { layer = new InputLayer(input); } else if (child is NativeLayerNode native) { NativeLayer nativeLayer = new(this, native.Native); AddChild(native.Native); return(nativeLayer); } else { layer = new Layer(child); } AddChild(layer); return(layer); }
public Layer(ILayerNode node) => Node = node;
public Layer(ILayerNode node) { Node = node; }