domain specific.cpp
来自「中间件编写示例 COM与.NET组件服务」· C++ 代码 · 共 28 行
CPP
28 行
// MyFilter.cpp : Implementation of CGenericFilter
#include "stdafx.h"
#include "Filter.h"
#include "MyFilter.h"
BOOL CGenericFilter::ShouldFire(const SubscriptionData& subscriptionData)const
{
if(subscriptionData.bstrDescription == _bstr_t("Paid Extra"))
{
return TRUE;
}
else
{
return FALSE;
}
}
_bstr_t CGenericFilter::GetCriteria()const
{
_bstr_t bstrCriteria = "ALL";//ALL means all the subscribers, regardless of event classes
//Example of what is possible:
//bstrCriteria = "EventClassID == {F89859D1-6565-11D1-88C8-0080C7D771BF} AND MethodName = 'StockPriceChange'"
return bstrCriteria;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?