| 12345678910111213141516171819202122232425262728293031323334353637 |
- #include "stdafx.h"
- #include "SpBase.h"
- #include "modVer.h"
- /*one of test module: use to test error: erro startup*/
- class CBlackSheep : public CEntityBase
- {
- public:
- CBlackSheep() {}
- virtual ~CBlackSheep() {}
- virtual const char *GetEntityName() const { return "BlackSheep"; }
- const char* GetEntityVersion() const { return MODULE_VERSION_FULL; }
- virtual void OnPreStart(CAutoArray<CSimpleStringA> strArgs, CSmartPointer<ITransactionContext> pTransactionContext)
- {
- LOG_FUNCTION();
- pTransactionContext->SendAnswer(Error_Unexpect);
- }
- virtual void OnStarted()
- {
- LOG_FUNCTION();
- }
- virtual void OnPreClose(EntityCloseCauseEnum eCloseCause,CSmartPointer<ITransactionContext> pTransactionContext)
- {
- LOG_FUNCTION();
- pTransactionContext->SendAnswer(Error_Succeed);
- }
- };
- SP_BEGIN_ENTITY_MAP()
- SP_ENTITY(CBlackSheep)
- SP_END_ENTITY_MAP()
|