internal BOPolicyDetail(BOPolicyDetailKey key, XElement node) { this.Key = key; this.MinBet = node.Get <decimal>("MinBet"); this.MaxBet = node.Get <decimal>("MaxBet"); this.AutoAcceptMaxBet = node.Get <decimal>("AutoAcceptMaxBet"); this.StepBet = node.Get <decimal>("StepBet"); this.Odds = node.Get <decimal>("Odds"); this.CommissionOpen = node.Get <decimal>("CommissionOpen"); this.MinCommissionOpen = node.Get <decimal>("MinCommissionOpen"); this.MaxOrderCount = node.Get <int?>("MaxOrderCount"); this.TotalBetLimit = node.Get <decimal?>("TotalBetLimit"); }
private void UpdateBOPolicyDetail(XElement node, string methodName) { Guid binaryOptionPolicyId = node.AttrToGuid("BOPolicyID"); Guid binaryOptionBetTypeId = node.AttrToGuid("BOBetTypeID"); int frequency = node.AttrToInt32("Frequency"); BOPolicyDetailKey key = new BOPolicyDetailKey(binaryOptionPolicyId, binaryOptionBetTypeId, frequency); if (methodName == "Add") { _itemDict.Add(key, new BOPolicyDetail(key, node)); } else if (methodName == "Delete") { _itemDict.Remove(key); } else if (methodName == "Modify") { _itemDict[key].Update(node); } }
internal bool TryGet(BOPolicyDetailKey key, out BOPolicyDetail detail) { return(_itemDict.TryGetValue(key, out detail)); }