Esempio n. 1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing && !IsDisposed)
            {
                Close(true);

                PrivateOptions.Dispose();
            }

            base.Dispose(disposing);
        }
Esempio n. 2
0
        private void Configure(IntPtr aioPtr)
        {
            PrivateOptions.SetSetters(
                x => __SetTimeoutDurationMilliseconds(_aioPtr, x)
                );

            // TODO: TBD: perhaps we can run direct through the C calling conventions.
            _free          = () => __Free(aioPtr);
            _wait          = () => __Wait(aioPtr);
            _stop          = () => __Stop(aioPtr);
            _cancel        = () => __Cancel(aioPtr);
            _getResult     = () => __GetResult(aioPtr);
            _getMessagePtr = () => __GetMessagePtr(aioPtr);
            _setMessagePtr = msgPtr => __SetMessagePtr(aioPtr, msgPtr);
        }