Пример #1
0
 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);
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
 public Layer(ILayerNode node) => Node = node;
Пример #4
0
 public Layer(ILayerNode node)
 {
     Node = node;
 }