#include <vccorlib.h>
|
template<typename __TDelegate , typename __TReturnType , typename __TInvokeMethod > |
__TReturnType | DoInvoke (Details::EventLock *__lockArg, __TInvokeMethod __invokeOneArg) |
|
template<typename __TDelegate , typename __TInvokeMethod > |
void | DoInvokeVoid (Details::EventLock *__lockArg, __TInvokeMethod __invokeOneArg) |
|
Platform::EventSource::EventSource |
( |
| ) |
|
|
inline |
2518 Details::EventSourceInitialize(&
__targets);
Platform::EventSource::~EventSource |
( |
| ) |
|
|
inline |
2523 Details::EventSourceUninitialize(&
__targets);
::Windows::Foundation::EventRegistrationToken Platform::EventSource::Add |
( |
Details::EventLock * |
__lockArg, |
|
|
::Platform::Object^ |
__delegateInterfaceArg |
|
) |
| |
|
inline |
2528 return Details::EventSourceAdd(&
__targets, __lockArg, reinterpret_cast< ::Platform::Delegate^>(__delegateInterfaceArg));
template<typename __TDelegate , typename __TReturnType , typename __TInvokeMethod >
__TReturnType Platform::EventSource::DoInvoke |
( |
Details::EventLock * |
__lockArg, |
|
|
__TInvokeMethod |
__invokeOneArg |
|
) |
| |
|
inlineprivate |
2551 ::Platform::Object^ __targetsLoc;
2553 *
reinterpret_cast<void**
>(&__targetsLoc) = Details::EventSourceGetTargetArray(
__targets, __lockArg);
2555 typename __TReturnType __returnVal =
typename __TReturnType();
2557 if (__targetsLoc !=
nullptr)
2559 const unsigned int __size = Details::EventSourceGetTargetArraySize(reinterpret_cast<void*>(__targetsLoc));
2561 for (
unsigned int __index = 0; __index < __size; __index++)
2563 ::Windows::Foundation::EventRegistrationToken __token = {};
2567 __TDelegate^ __element;
2568 *
reinterpret_cast<void**
>(&__element) = Details::EventSourceGetTargetArrayEvent(
2569 reinterpret_cast<void*>(__targetsLoc),
2571 reinterpret_cast<const void*
>(&__uuidof(__TDelegate^)),
2575 __returnVal = (__invokeOneArg)(__element);
2577 catch(::Platform::Exception^ e)
2579 int __hr = e->HResult;
2580 if (__hr == 0x800706BA
2581 || __hr == 0x80010108
2582 || __hr == 0x89020001 )
2584 Details::EventSourceRemove(&
__targets, __lockArg, __token);
template<typename __TDelegate , typename __TInvokeMethod >
2611 ::Platform::Object^ __targetsLoc;
2613 *
reinterpret_cast<void**
>(&__targetsLoc) = Details::EventSourceGetTargetArray(
__targets, __lockArg);
2616 if (__targetsLoc !=
nullptr)
2618 const unsigned int __size = Details::EventSourceGetTargetArraySize(reinterpret_cast<void*>(__targetsLoc));
2620 for (
unsigned int __index = 0; __index < __size; __index++)
2622 ::Windows::Foundation::EventRegistrationToken __token = {};
2626 __TDelegate^ __element;
2627 *
reinterpret_cast<void**
>(&__element) = Details::EventSourceGetTargetArrayEvent(
2628 reinterpret_cast<void*>(__targetsLoc),
2630 reinterpret_cast<const void*
>(&__uuidof(__TDelegate^)),
2634 (__invokeOneArg)(__element);
2636 catch(::Platform::Exception^ e)
2638 int __hr = e->HResult;
2639 if (__hr == 0x800706BA
2640 || __hr == 0x80010108
2641 || __hr == 0x89020001 )
2643 Details::EventSourceRemove(&
__targets, __lockArg, __token);
template<typename __TLambda , typename __TReturnType , typename... __TArgs>
__TReturnType Platform::EventSource::Invoke |
( |
Details::EventLock * |
__lockArg, |
|
|
__TArgs... |
__args |
|
) |
| |
|
inline |
2664 return DoInvoke<__TLambda, __TReturnType>(__lockArg, [__args...](__TLambda^ __lambda) ->
typename __TReturnType {
return __lambda(__args...); });
template<typename __TLambda , typename... __TArgs>
2658 DoInvokeVoid<__TLambda>(__lockArg, [__args...](__TLambda^ __lambda) ->
void { __lambda(__args...); });
void Platform::EventSource::Remove |
( |
Details::EventLock * |
__lockArg, |
|
|
::Windows::Foundation::EventRegistrationToken |
__tokenArg |
|
) |
| |
|
inline |
2533 Details::EventSourceRemove(&
__targets, __lockArg, __tokenArg);
void* Platform::EventSource::__targets |
|
protected |
The documentation for this class was generated from the following file: