#pragma once #include "IJsonCommandCreator.h" namespace Incart::Net::WebApi { template class JsonCommandCreator final : public IJsonCommandCreator { private: std::tuple m_args; public: JsonCommandCreator(TArgs... args) : m_args(std::forward(args)...) { } std::shared_ptr create() override { return createCommand(std::make_index_sequence{}); } private: template std::shared_ptr createCommand(std::index_sequence) { return std::make_shared(std::get(m_args)...); } }; } // namespace Incart::Net::WebApi