예제 #1
0
        public YogaNode()
        {
            YogaLogger.Initialize();

            _ygNode = Native.YGNodeNew();
            if (_ygNode.IsInvalid)
            {
                throw new InvalidOperationException("Failed to allocate native memory");
            }
        }
예제 #2
0
파일: YogaNode.cs 프로젝트: zmjios/yoga
        public YogaNode(YogaConfig config)
        {
            YogaLogger.Initialize();

            _ygNode = Native.YGNodeNewWithConfig(config.Handle);
            if (_ygNode.IsInvalid)
            {
                throw new InvalidOperationException("Failed to allocate native memory");
            }
        }