#pragma once
// clang-format off
//------------------------------------------------------------------------------
//
// This code was generated by the TS2DS compiler.
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
//
//------------------------------------------------------------------------------
#include "NativeInterop.g.h"
namespace Mso { namespace JSHost {
//================================================================================
// Service implementation (C++)
//================================================================================
void DataService<::FormulaByExampleCard::Interop::IFormulaByExampleCardInterop>::Invoke(const char* methodName, const char* serializedValue, Mso::TCntPtr&& result) noexcept
{
(void)serializedValue, (void)result;
if (IsSameMethodName(methodName, "applySuggestion"))
{
this->applySuggestion();
}
else if (IsSameMethodName(methodName, "declineSuggestion"))
{
this->declineSuggestion();
}
else if (IsSameMethodName(methodName, "giveFeedback"))
{
this->giveFeedback();
}
else if (IsSameMethodName(methodName, "applyAsValue"))
{
this->applyAsValue();
}
else
{
UnknownMethod(methodName);
}
}
//================================================================================
// Custom Value serialization
//================================================================================
void ReadJsonObject(Mso::JSHost::JsonReader& reader, ::FormulaByExampleCard::Interop::IFormulaByExampleCardProps& obj) noexcept
{
reader.ReadObjectStart();
while (reader.ReadNextProperty())
{
reader.TryGetProperty(L"formula", /*ref*/obj.formula) ||
reader.TryGetProperty(L"range", /*ref*/obj.range) ||
reader.TryGetProperty(L"kind", /*ref*/obj.kind) ||
reader.UnknownProperty();
}
}
void WriteJsonObject(Mso::JSHost::JsonWriter& writer, const ::FormulaByExampleCard::Interop::IFormulaByExampleCardProps& obj) noexcept
{
writer.WriteObjectStart();
writer.WriteProperty(L"formula", obj.formula);
writer.WriteProperty(L"range", obj.range);
writer.WriteProperty(L"kind", obj.kind);
writer.WriteObjectEnd();
}
}} // namespace Mso::JSHost