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); }
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) ); }
protected internal virtual void InvokeHavingNoResult <T>(InvocationHavingNoResult <T> caller, T ptr) { caller(ptr); }
protected internal virtual void InvokeHavingNoResult(InvocationHavingNoResult caller) { caller(); }
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); }