예제 #1
0
        internal static IntPtr GetPtr(RID instance)
        {
            if (instance == null)
            {
                return(IntPtr.Zero);
            }

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

            return(instance.ptr);
        }
예제 #2
0
파일: RID.cs 프로젝트: LightningAA/godot
        internal static IntPtr GetPtr(RID instance)
        {
            if (instance == null)
            {
                throw new NullReferenceException($"The instance of type {nameof(RID)} is null.");
            }

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

            return(instance.ptr);
        }