[UWP Renderer]: Action/MediaEventInvoker expose a constructor that takes RenderedAdaptiveCard (#6911)
This commit is contained in:
Родитель
2b07a25335
Коммит
d205de57c6
|
@ -449,6 +449,7 @@ namespace AdaptiveCards
|
|||
runtimeclass AdaptiveActionInvoker
|
||||
{
|
||||
AdaptiveActionInvoker();
|
||||
AdaptiveActionInvoker(RenderedAdaptiveCard renderResult);
|
||||
|
||||
void SendActionEvent(AdaptiveCards.ObjectModel.Uwp.IAdaptiveActionElement actionElement);
|
||||
}
|
||||
|
@ -456,6 +457,7 @@ namespace AdaptiveCards
|
|||
runtimeclass AdaptiveMediaEventInvoker
|
||||
{
|
||||
AdaptiveMediaEventInvoker();
|
||||
AdaptiveMediaEventInvoker(RenderedAdaptiveCard renderResult);
|
||||
|
||||
void SendMediaClickedEvent(AdaptiveCards.ObjectModel.Uwp.AdaptiveMedia mediaElement);
|
||||
}
|
||||
|
|
|
@ -8,11 +8,6 @@
|
|||
|
||||
namespace winrt::AdaptiveCards::Rendering::Uwp::implementation
|
||||
{
|
||||
AdaptiveMediaEventInvoker::AdaptiveMediaEventInvoker(winrt::RenderedAdaptiveCard const& renderResult) :
|
||||
m_weakRenderResult(renderResult)
|
||||
{
|
||||
}
|
||||
|
||||
void AdaptiveMediaEventInvoker::SendMediaClickedEvent(winrt::AdaptiveMedia const& mediaElement)
|
||||
{
|
||||
if (auto renderResult = peek_innards<implementation::RenderedAdaptiveCard>(m_weakRenderResult.get()))
|
||||
|
|
|
@ -9,12 +9,12 @@ namespace winrt::AdaptiveCards::Rendering::Uwp::implementation
|
|||
{
|
||||
struct AdaptiveMediaEventInvoker : AdaptiveMediaEventInvokerT<AdaptiveMediaEventInvoker>
|
||||
{
|
||||
AdaptiveMediaEventInvoker() {}
|
||||
|
||||
AdaptiveMediaEventInvoker(winrt::RenderedAdaptiveCard const& renderResult);
|
||||
AdaptiveMediaEventInvoker(winrt::RenderedAdaptiveCard const& renderResult = nullptr) :
|
||||
m_weakRenderResult(renderResult)
|
||||
{
|
||||
}
|
||||
|
||||
void SendMediaClickedEvent(winrt::AdaptiveMedia const& mediaElement);
|
||||
|
||||
winrt::weak_ref<winrt::RenderedAdaptiveCard> m_weakRenderResult;
|
||||
};
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче