virtual public int CompareTo(object other)
        {
            IBookParty otherParty = other as IBookParty;

            bool equalsContractIndex = this.ContractIndex().Equals(otherParty.ContractIndex());

            if (equalsContractIndex)
            {
                return(this.PositionIndex().CompareTo(otherParty.PositionIndex()));
            }
            return(this.ContractIndex().CompareTo(otherParty.ContractIndex()));
        }
        public bool isEqualToParty(IBookParty other)
        {
            bool equalsContractIndex = this.ContractIndex().Equals(other.ContractIndex());

            bool equalsPositionIndex = this.PositionIndex().Equals(other.PositionIndex());

            return(equalsContractIndex && equalsPositionIndex);
        }
Esempio n. 3
0
 public static bool IsEqualToPositionParty(IBookParty position, IBookIndex element)
 {
     return(element.ContractIndex().Equals(position.ContractIndex()) &&
            element.PositionIndex().Equals(position.PositionIndex()));
 }
 public BookIndex(IBookParty party, uint code, uint codeOrder)
     : base(party.ContractIndex(), party.PositionIndex())
 {
     this.__index = new CodeIndex(code, codeOrder);
 }