public bool ExchangeSuspendResume(Dictionary<string, List<Guid>> instruments, bool resume) { bool isSuccess = true; foreach (string system in instruments.Keys) { iExchange.Common.Manager.ParameterUpdateTask task = new iExchange.Common.Manager.ParameterUpdateTask(); task.Instruments = instruments[system].ToArray(); foreach (Guid id in instruments[system]) { iExchange.Common.Manager.ExchangeSetting set = new iExchange.Common.Manager.ExchangeSetting(); set.Id = id; set.ParameterKey = "IsPriceEnabled"; set.ParameterValue = XmlConvert.ToString(resume); task.ExchangeSettings.Add(set); } foreach (Guid id in instruments[system]) { iExchange.Common.Manager.ExchangeSetting set = new iExchange.Common.Manager.ExchangeSetting(); set.Id = id; set.ParameterKey = "IsAutoEnablePrice"; set.ParameterValue = XmlConvert.ToString(resume); task.ExchangeSettings.Add(set); } if (!this._ExchangeSystems[system].UpdateInstrument(task)) { isSuccess = false; } } return isSuccess; }
public bool UpdateInstrument(InstrumentQuotationSet set) { Guid[] instruments = new Guid[1]; instruments[0] = set.InstrumentId; iExchange.Common.Manager.ParameterUpdateTask task = new iExchange.Common.Manager.ParameterUpdateTask(); task.Instruments = instruments; string value = string.Empty; if (set.type == InstrumentQuotationEditType.IsPriceEnabled || set.type == InstrumentQuotationEditType.IsOriginHiLo || set.type == InstrumentQuotationEditType.IsAutoFill || set.type == InstrumentQuotationEditType.IsAutoEnablePrice) { value = XmlConvert.ToString((bool)set.Value); } else { value = set.Value.ToString(); } task.ExchangeSettings.Add(new iExchange.Common.Manager.ExchangeSetting { Id = set.InstrumentId, ParameterKey = Enum.GetName(typeof(InstrumentQuotationEditType), set.type), ParameterValue = value }); return this._ExchangeSystems[set.ExchangeCode].UpdateInstrument(task); }
public bool UpdateInstrument(iExchange.Common.Token token, iExchange.Common.Manager.ParameterUpdateTask parameterUpdateTask) { throw new NotImplementedException(); }