Ejemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public FXCMAdapter()
        {
            DataSourceStub dataSourceStub = new DataSourceStub("FXCM Adapter Data", true);
            OrderExecutionSourceStub orderExecutionSourceStub = new OrderExecutionSourceStub("FXCM Adapter Execution", true);

            base.SetInitialParameters(dataSourceStub, orderExecutionSourceStub);
            Construct();
        }
Ejemplo n.º 2
0
        public bool SetStub(OrderExecutionSourceStub orderExecutionStub)
        {
            if (_orderExecutionStub != null)
            {
                return(false);
            }

            _orderExecutionStub = orderExecutionStub;
            return(true);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public FXCMAdapter()
        {
            _orderExecutionStub = new OrderExecutionSourceStub("FXCM Adapter Execution", false);
            _dataSourceStub = new DataSourceStub("FXCM Adapter Data", true);

            base.SetStub(_dataSourceStub);
            base.SetStub(_orderExecutionStub);

            Construct();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public FXCMOrders(FXCMAdapter adapter, OrderExecutionSourceStub stub)
        {
            _adapter = adapter;

            StatusSynchronizationEnabled = true;
            StatusSynchronizationSource = adapter;

            _stub = stub;
            _stub.Initialize(this);
        }
Ejemplo n.º 5
0
        /// <summary>
        ///
        /// </summary>
        public bool SetInitialParameters(DataSourceStub dataSourceStub, OrderExecutionSourceStub orderExecutionStub)
        {
            if (_dataSourceStub != null || _orderExecutionStub != null)
            {
                return(false);
            }

            _dataSourceStub     = dataSourceStub;
            _orderExecutionStub = orderExecutionStub;

            return(true);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 public StubIntegrationAdapter(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     try
     {
         _dataSourceStub     = (DataSourceStub)info.GetValue("dataSourceStub", typeof(DataSourceStub));
         _orderExecutionStub = (OrderExecutionSourceStub)info.GetValue("orderSourceStub", typeof(OrderExecutionSourceStub));
     }
     catch (Exception ex)
     {
         SystemMonitor.OperationError("Failed to deserialize stub integration adapter", ex);
     }
 }
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 public StubIntegrationAdapter(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     try
     {
         _dataSourceStub = (DataSourceStub)info.GetValue("dataSourceStub", typeof(DataSourceStub));
         _orderExecutionStub = (OrderExecutionSourceStub)info.GetValue("orderSourceStub", typeof(OrderExecutionSourceStub));
     }
     catch (Exception ex)
     {
         SystemMonitor.OperationError("Failed to deserialize stub integration adapter", ex);
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 public IntegrationAdapter(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _dataSourceStub     = (DataSourceStub)info.GetValue("dataSourceStub", typeof(DataSourceStub));
     _orderExecutionStub = (OrderExecutionSourceStub)info.GetValue("orderSourceStub", typeof(OrderExecutionSourceStub));
 }
        public bool SetStub(OrderExecutionSourceStub orderExecutionStub)
        {
            if (_orderExecutionStub != null)
            {
                return false;
            }

            _orderExecutionStub = orderExecutionStub;
            return true;
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public MBTradingAdapter()
            : base()
        {
            DataSourceStub dataSourceStub = new DataSourceStub("MBTrading Adapter Data", true);
            OrderExecutionSourceStub orderExecutionSourceStub = new OrderExecutionSourceStub("MBTrading Adapter Execution", false);

            base.SetStub(dataSourceStub);
            base.SetStub(orderExecutionSourceStub);

            Construct();
        }
Ejemplo n.º 11
0
 public void Dispose()
 {
     _adapter = null;
     _stub = null;
 }
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 public IntegrationAdapter(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _dataSourceStub = (DataSourceStub)info.GetValue("dataSourceStub", typeof(DataSourceStub));
     _orderExecutionStub = (OrderExecutionSourceStub)info.GetValue("orderSourceStub", typeof(OrderExecutionSourceStub));
 }
        /// <summary>
        /// 
        /// </summary>
        public bool SetInitialParameters(DataSourceStub dataSourceStub, OrderExecutionSourceStub orderExecutionStub)
        {
            if (_dataSourceStub != null || _orderExecutionStub != null)
            {
                return false;
            }

            _dataSourceStub = dataSourceStub;
            _orderExecutionStub = orderExecutionStub;

            return true;
        }