public override int GetHashCode() { int hash = 1; if (BrokerId.Length != 0) { hash ^= BrokerId.GetHashCode(); } if (InvestorId.Length != 0) { hash ^= InvestorId.GetHashCode(); } if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (HedgeFlag != 0) { hash ^= HedgeFlag.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
async Task Execute(InvestorId id, Func <Investor, Task> update) { var ad = await _store.Load <Investor>(id); await update(ad); await _store.Save(ad); }
public override int GetHashCode() { int hash = 1; if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (BrokerId.Length != 0) { hash ^= BrokerId.GetHashCode(); } if (InvestorId.Length != 0) { hash ^= InvestorId.GetHashCode(); } if (OpenRatioByMoney != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(OpenRatioByMoney); } if (OpenRatioByVolume != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(OpenRatioByVolume); } if (CloseRatioByMoney != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(CloseRatioByMoney); } if (CloseRatioByVolume != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(CloseRatioByVolume); } if (CloseTodayRatioByMoney != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(CloseTodayRatioByMoney); } if (CloseTodayRatioByVolume != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(CloseTodayRatioByVolume); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (BrokerId.Length != 0) { hash ^= BrokerId.GetHashCode(); } if (InvestorId.Length != 0) { hash ^= InvestorId.GetHashCode(); } if (UserId.Length != 0) { hash ^= UserId.GetHashCode(); } if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (OrderSysId.Length != 0) { hash ^= OrderSysId.GetHashCode(); } if (OrderRef.Length != 0) { hash ^= OrderRef.GetHashCode(); } if (FrontId != 0) { hash ^= FrontId.GetHashCode(); } if (SessionId != 0) { hash ^= SessionId.GetHashCode(); } if (ActionFlag != 0) { hash ^= ActionFlag.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (InvestorId?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PrimaryPhone?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (SecondaryPhone?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Fax?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (WebSite?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Company?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ContactPerson?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Logo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (SupervisingAuthority?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (RegistrationNo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DomainFocus?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (TurnOver?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (VatNumber?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (AddressTwo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (AddressOne?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ManagingDirector?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (TargetMarket?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CustomerSizeFrom?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CustomerSizeTo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (LocalJurisdiction?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CommercialRegNo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OtherMinRequirements?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CRR.GetHashCode()); hashCode = hashCode * -1521134295 + (UploadCompliance?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OtherMemberships?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OtherDomainFocus?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (InvestorStatus?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (IAFC.GetHashCode()); hashCode = hashCode * -1521134295 + (Prefix?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (UserName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PasswordHash?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (SecurityStamp?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (EmailConfirmed.GetHashCode()); hashCode = hashCode * -1521134295 + (LockoutEnabled.GetHashCode()); hashCode = hashCode * -1521134295 + (PhoneNumberConfirmed.GetHashCode()); hashCode = hashCode * -1521134295 + (TwoFactorEnabled.GetHashCode()); hashCode = hashCode * -1521134295 + (AccessFailedCount?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Name?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Email?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PhoneNumber?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (LockoutEndDate?.GetHashCode() ?? 0); return(hashCode); }
public override int GetHashCode() { int hash = 1; if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (BrokerId.Length != 0) { hash ^= BrokerId.GetHashCode(); } if (InvestorId.Length != 0) { hash ^= InvestorId.GetHashCode(); } if (HedgeFlag != 0) { hash ^= HedgeFlag.GetHashCode(); } if (LongMarginRatioByMoney != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LongMarginRatioByMoney); } if (LongMarginRatioByVolume != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LongMarginRatioByVolume); } if (ShortMarginRatioByMoney != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(ShortMarginRatioByMoney); } if (ShortMarginRatioByVolume != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(ShortMarginRatioByVolume); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (BrokerId.Length != 0) { hash ^= BrokerId.GetHashCode(); } if (InvestorId.Length != 0) { hash ^= InvestorId.GetHashCode(); } if (UserId.Length != 0) { hash ^= UserId.GetHashCode(); } if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (OrderPriceType != 0) { hash ^= OrderPriceType.GetHashCode(); } if (Direction != 0) { hash ^= Direction.GetHashCode(); } if (CombOffsetFlag != 0) { hash ^= CombOffsetFlag.GetHashCode(); } if (CombHedgeFlag != 0) { hash ^= CombHedgeFlag.GetHashCode(); } if (LimitPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LimitPrice); } if (VolumeTotalOriginal != 0) { hash ^= VolumeTotalOriginal.GetHashCode(); } if (TimeCondition != 0) { hash ^= TimeCondition.GetHashCode(); } if (VolumeCondition != 0) { hash ^= VolumeCondition.GetHashCode(); } if (MinVolume != 0) { hash ^= MinVolume.GetHashCode(); } if (ContigentCondition != 0) { hash ^= ContigentCondition.GetHashCode(); } if (StopPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(StopPrice); } if (ForceCloseReason != 0) { hash ^= ForceCloseReason.GetHashCode(); } if (IsAutoSuspend != 0) { hash ^= IsAutoSuspend.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (BrokerId.Length != 0) { hash ^= BrokerId.GetHashCode(); } if (InvestorId.Length != 0) { hash ^= InvestorId.GetHashCode(); } if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (OrderRef.Length != 0) { hash ^= OrderRef.GetHashCode(); } if (UserId.Length != 0) { hash ^= UserId.GetHashCode(); } if (TradeId.Length != 0) { hash ^= TradeId.GetHashCode(); } if (Direction != 0) { hash ^= Direction.GetHashCode(); } if (OffsetFlag != 0) { hash ^= OffsetFlag.GetHashCode(); } if (HedgeFlag != 0) { hash ^= HedgeFlag.GetHashCode(); } if (Price != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Price); } if (Volume != 0) { hash ^= Volume.GetHashCode(); } if (TradeDate.Length != 0) { hash ^= TradeDate.GetHashCode(); } if (TradeTime.Length != 0) { hash ^= TradeTime.GetHashCode(); } if (OrderLocalId.Length != 0) { hash ^= OrderLocalId.GetHashCode(); } if (TradingDay.Length != 0) { hash ^= TradingDay.GetHashCode(); } if (BrokerOrderSeq != 0) { hash ^= BrokerOrderSeq.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
Task Execute(InvestorId id, Action <Investor> update) { return(Execute(id, ad => { update(ad); return Task.CompletedTask; })); }