/// <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();
        }
Exemple #2
0
        public bool SetStub(OrderExecutionSourceStub orderExecutionStub)
        {
            if (_orderExecutionStub != null)
            {
                return(false);
            }

            _orderExecutionStub = orderExecutionStub;
            return(true);
        }
        /// <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();
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public FXCMOrders(FXCMAdapter adapter, OrderExecutionSourceStub stub)
        {
            _adapter = adapter;

            StatusSynchronizationEnabled = true;
            StatusSynchronizationSource = adapter;

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

            _dataSourceStub     = dataSourceStub;
            _orderExecutionStub = orderExecutionStub;

            return(true);
        }
Exemple #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);
     }
 }
Exemple #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();
        }
 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;
        }