コード例 #1
0
        static IntPtr Create(CTRunDelegateOperations operations)
        {
            if (operations == null)
            {
                throw new ArgumentNullException(nameof(operations));
            }

            CTRunDelegateCallbacks callbacks = operations.GetCallbacks();

            return(CTRunDelegateCreate(ref callbacks, operations.Handle));
        }
コード例 #2
0
        public CTRunDelegate(CTRunDelegateOperations operations)
        {
            if (operations == null)
            {
                throw ConstructorError.ArgumentNull(this, "operations");
            }

            handle = CTRunDelegateCreate(operations.GetCallbacks(), GCHandle.ToIntPtr(operations.handle));
            if (handle == IntPtr.Zero)
            {
                throw ConstructorError.Unknown(this);
            }
        }
コード例 #3
0
 public CTRunDelegate(CTRunDelegateOperations operations)
     : base(Create(operations), true)
 {
 }