예제 #1
0
 private TradeSignalExecutor(ITradeSignalExecutor proxyOrStub = null)
 {
     if (proxyOrStub != null)
     {
         proxy = proxyOrStub;
         return;
     }
     try
     {
         proxy = ProxyBuilder.Instance.GetImplementer<ITradeSignalExecutor>();
     }
     catch (Exception ex)
     {
         Logger.Error("TradeSignalExecutor ctor", ex);
     }
 }
예제 #2
0
 private TradeSignalExecutor(ITradeSignalExecutor proxyOrStub = null)
 {
     if (proxyOrStub != null)
     {
         proxy = proxyOrStub;
         return;
     }
     try
     {
         proxy = ProxyBuilder.Instance.GetImplementer <ITradeSignalExecutor>();
     }
     catch (Exception ex)
     {
         Logger.Error("TradeSignalExecutor ctor", ex);
     }
 }
 private void RenewFactory()
 {
     try
     {
         if (factory != null)
         {
             factory.Abort();
         }
         factory = new ChannelFactory <ITradeSignalExecutor>(endpointName);
         channel = factory.CreateChannel();
     }
     catch (Exception ex)
     {
         Logger.Error("TradeSignalExecutorProxy: невозможно создать прокси", ex);
         channel = null;
     }
 }
 public static void InitializeFake(ITradeSignalExecutor chan)
 {
     fakeChannel = chan;
 }
 private void RenewFactory()
 {
     try
     {
         if (factory != null) factory.Abort();
         factory = new ChannelFactory<ITradeSignalExecutor>(endpointName);
         channel = factory.CreateChannel();
     }
     catch (Exception ex)
     {
         Logger.Error("TradeSignalExecutorProxy: невозможно создать прокси", ex);
         channel = null;
     }
 }
 public static void InitializeFake(ITradeSignalExecutor chan)
 {
     fakeChannel = chan;
 }
예제 #7
0
 public static void Initialize(ITradeSignalExecutor proxyOrStub)
 {
     instance = new TradeSignalExecutor(proxyOrStub);
 }
예제 #8
0
 public static void Initialize(ITradeSignalExecutor proxyOrStub)
 {
     instance = new TradeSignalExecutor(proxyOrStub);
 }