auto config std make_shared Message MessageCategory Configuration Mess

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
auto config = std::make_shared<Message>(MessageCategory::Configuration, MessageType::CrawlerConfiguration);
auto propEnum = configuration->GetProperties();
while (propEnum->MoveNext())
{
auto property = propEnum->Current();
switch (property->getId())
{
case Contract::PropertyType::SessionId:
config->AddProperty(%PROPERTY_ID%, property->getValue()[0].get<uint32_t>());
break;
case Contract::PropertyType::Guid:
config->AddProperty(%PROPERTY_ID%, property->getValue()[0].get<std::string>());
break;
case Contract::PropertyType::KeyWords:
config->AddProperty(%PROPERTY_ID%, property->getValue()[0].get<std::string>());
break;