本文整理汇总了C++中IProperties::removeProp方法的典型用法代码示例。如果您正苦于以下问题:C++ IProperties::removeProp方法的具体用法?C++ IProperties::removeProp怎么用?C++ IProperties::removeProp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IProperties
的用法示例。
在下文中一共展示了IProperties::removeProp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MakeStringException
StringBuffer& CLogThread::serializeRequest(IEspContext& context,IInterface& logInfo, StringBuffer& returnStr)
{
IRpcSerializable* rpcreq = dynamic_cast<IRpcSerializable*>(&logInfo);
if(rpcreq==NULL)
throw MakeStringException(500,"Issue serializing log information");
// We want to serialize anything here for logging purpose: e.g., internal user fields: CompanyId
// rpcreq->serialize(&context,returnStr, "LogData");
// rpcreq->serialize(NULL,returnStr, "LogData");
//BUG#26047
//logInfo function parameter is instance of the incoming request object of the service.
//instance objects of context and request are dependent upon the protocol binding.
//Request parameters are relevent for HTTP protocol but are not relevent for protocolX.
//Since request parameters pointer is not initilized in processing protocolX request it remains NULL
//and causing this crash.
IProperties* params = context.queryRequestParameters();
if(params!=NULL)
{
bool notInternal = !params->hasProp("internal");
if (notInternal)
params->setProp("internal","1");
rpcreq->serialize(&context,returnStr, "LogData");
if (notInternal)
params->removeProp("internal");
}else{
rpcreq->serialize(NULL,returnStr, "LogData");
}
return returnStr;
}