Beispiel #1
0
        public CSSNode()
        {
            CSSAssert.Initialize();
            CSSLogger.Initialize();

            _cssNode = Native.CSSNodeNew();
            if (_cssNode == IntPtr.Zero)
            {
                throw new InvalidOperationException("Failed to allocate native memory");
            }
        }
Beispiel #2
0
        public void Reinitialize()
        {
            if (_cssNode != IntPtr.Zero)
            {
                throw new InvalidOperationException("Allready initialized node");
            }

            CSSAssert.Initialize();
            _cssNode  = Native.CSSNodeNew();
            _children = new List <CSSNode>(4);
            Native.CSSNodeSetPrintFunc(_cssNode, PrintInternal);
        }