Beispiel #1
0
        internal static IntPtr GetPtr(NodePath instance)
        {
            if (instance == null)
            {
                throw new NullReferenceException($"The instance of type {nameof(NodePath)} is null.");
            }

            if (instance._disposed)
            {
                throw new ObjectDisposedException(instance.GetType().FullName);
            }

            return(instance.ptr);
        }
Beispiel #2
0
        internal static IntPtr GetPtr(NodePath instance)
        {
            if (instance == null)
            {
                return(IntPtr.Zero);
            }

            if (instance.disposed)
            {
                throw new ObjectDisposedException(instance.GetType().FullName);
            }

            return(instance.ptr);
        }