Example #1
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);
        }
Example #2
0
        private void Configure(uint pid)
        {
            _closer = () => __Close(pid);

            _reset = ptr => __SetPipe(ptr, pid);

            var opt = PrivateOptions;

            opt.SetGetters(
                (string name, ref int value) => __GetOptInt32(pid, name, ref value)
                , (string name, ref ulong value) => __GetOptUInt64(pid, name, ref value)
                , (string name, StringBuilder value, ref ulong length) => __GetOptStringBuilder(
                    pid, name, value, ref length)
                , (string name, ref int value) => __GetOptDurationMilliseconds(pid, name, ref value)
                );
        }
Example #3
0
 protected internal virtual void InvokeHavingNoResult <T>(InvocationHavingNoResult <T> caller, T ptr)
 {
     caller(ptr);
 }
Example #4
0
 protected internal virtual void InvokeHavingNoResult(InvocationHavingNoResult caller)
 {
     caller();
 }
Example #5
0
 internal void InvokeHavingNoResult(InvocationHavingNoResult <IntPtr> caller)
 {
     // We override these because we want to perform special handling of the underlying Message Ptr.
     Allocate(ref _msgPtr);
     InvokeHavingNoResult(caller, _msgPtr);
 }