FdcCommunicator.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using SinochemInternetPlusApp.Communicator;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Configuration;
  5. using System.Data.SqlClient;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading;
  9. using Wayne.Lib;
  10. using Wayne.Lib.Log;
  11. namespace SinochemInternetPlusApp
  12. {
  13. public class FdcCommunicator
  14. {
  15. /// <summary>
  16. /// 0 for not started, 1 for started already.
  17. /// </summary>
  18. private int isStarted = 0;
  19. private const string DEFAULT_FDC_SERVER_CONNECT_STRING = "Host=127.0.0.1,Port=4710,ClientId=101,ClientName=PetroChinaProxy,PortB=4710,PortC=4710";
  20. private readonly string concreteFdcServerConnString = string.Empty;
  21. //private readonly DebugLogger debugLogger =
  22. // new DebugLogger(new IdentifiableEntity(0, "FC2PosProxyMain", "", null));
  23. static NLog.Logger debugLogger = NLog.LogManager.LoadConfiguration("nlog.config").GetLogger("PumpHandler");
  24. private bool autoAuthorizePumpWhenCalling = false;
  25. /// <summary>
  26. /// The Fdc communicator works as a FDC client which connected to FC.
  27. /// </summary>
  28. /// <param name="msgRouterClient">somehow, still need to communicate the Message Router</param>
  29. public FdcCommunicator()
  30. {
  31. }
  32. public bool IsStarted
  33. {
  34. get { return this.isStarted == 1; }
  35. }
  36. }
  37. }