DefaultBizBehavior.cs 984 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel.Composition;
  6. namespace MediII.Adapter.BizComponent.Base
  7. {
  8. /// <summary>
  9. /// 默认的实现,写日志
  10. /// </summary>
  11. public class DefaultBizBehavior:IBizBehavior
  12. {
  13. public void AfterProcess(string id,string messageID, string ack, bool successed)
  14. {
  15. string content = string.Format("消息:{0}已处理完毕,处理结果为:{1}\n\r回复消息为:{1}",messageID,successed,ack);
  16. MediII.Common.LogHelper.LogDebug(content, Common.LogCatagories.BizBehavior);
  17. }
  18. public void BeforeProcess(string id, string messageID, string message, string Version)
  19. {
  20. string content = string.Format("消息:{0}已接收,内容为:{1}", messageID, message);
  21. MediII.Common.LogHelper.LogDebug(content, Common.LogCatagories.BizBehavior);
  22. }
  23. }
  24. }