Пример #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (ActionStartMs != 0L)
            {
                hash ^= ActionStartMs.GetHashCode();
            }
            if (DurationMs != 0)
            {
                hash ^= DurationMs.GetHashCode();
            }
            if (EnergyDelta != 0)
            {
                hash ^= EnergyDelta.GetHashCode();
            }
            if (AttackerIndex != 0)
            {
                hash ^= AttackerIndex.GetHashCode();
            }
            if (TargetIndex != 0)
            {
                hash ^= TargetIndex.GetHashCode();
            }
            if (ActivePokemonId != 0UL)
            {
                hash ^= ActivePokemonId.GetHashCode();
            }
            if (playerJoined_ != null)
            {
                hash ^= PlayerJoined.GetHashCode();
            }
            if (battleResults_ != null)
            {
                hash ^= BattleResults.GetHashCode();
            }
            if (DamageWindowsStartTimestampMs != 0L)
            {
                hash ^= DamageWindowsStartTimestampMs.GetHashCode();
            }
            if (DamageWindowsEndTimestampMs != 0L)
            {
                hash ^= DamageWindowsEndTimestampMs.GetHashCode();
            }
            if (playerLeft_ != null)
            {
                hash ^= PlayerLeft.GetHashCode();
            }
            if (TargetPokemonId != 0UL)
            {
                hash ^= TargetPokemonId.GetHashCode();
            }
            return(hash);
        }
Пример #2
0
        void IXmlSerializable.WriteXml(XmlWriter writer)
        {
            var xmlSerializer = new XmlSerializer(typeof(Coordinates));

            xmlSerializer.Serialize(writer, ObservationPoint);

            writer.WriteElementString(nameof(Intensity), Intensity.ToString(CultureInfo.InvariantCulture));
            writer.WriteElementString(nameof(DurationMs), DurationMs.ToString());
            writer.WriteElementString(nameof(ObservationTime), ObservationTime.ToString(CultureInfo.InvariantCulture));
            writer.WriteElementString(nameof(EstimatedValue), EstimatedValue.ToString(CultureInfo.InvariantCulture));
        }
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 13;
         hash = (hash * 127) ^ (Key != null ? Key.GetHashCode() : 0);
         hash = (hash * 127) ^ (Type.GetHashCode());
         hash = (hash * 127) ^ (DurationMs.GetHashCode());
         return(hash);
     }
 }
Пример #4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (unlockRequirements_ != null)
            {
                hash ^= UnlockRequirements.GetHashCode();
            }
            if (visibilityRequirements_ != null)
            {
                hash ^= VisibilityRequirements.GetHashCode();
            }
            if (MinRunestoneLevel != 0)
            {
                hash ^= MinRunestoneLevel.GetHashCode();
            }
            if (MaxRunestoneLevel != 0)
            {
                hash ^= MaxRunestoneLevel.GetHashCode();
            }
            if (PlayerCap != 0)
            {
                hash ^= PlayerCap.GetHashCode();
            }
            if (DurationMs != 0L)
            {
                hash ^= DurationMs.GetHashCode();
            }
            if (KnockoutTimeMs != 0L)
            {
                hash ^= KnockoutTimeMs.GetHashCode();
            }
            hash ^= PlayerCountMultipliers.GetHashCode();
            if (BaseChamberRating != 0)
            {
                hash ^= BaseChamberRating.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #5
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Package.Length != 0)
            {
                hash ^= Package.GetHashCode();
            }
            if (Class.Length != 0)
            {
                hash ^= Class.GetHashCode();
            }
            if (Status != global::Interface.Protobuf.Status.SSuccess)
            {
                hash ^= Status.GetHashCode();
            }
            if (Error.Length != 0)
            {
                hash ^= Error.GetHashCode();
            }
            if (StackTrace.Length != 0)
            {
                hash ^= StackTrace.GetHashCode();
            }
            if (DurationMs != 0L)
            {
                hash ^= DurationMs.GetHashCode();
            }
            if (CheckCount != 0)
            {
                hash ^= CheckCount.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MovementId != 0)
            {
                hash ^= MovementId.GetHashCode();
            }
            if (AnimationId != 0)
            {
                hash ^= AnimationId.GetHashCode();
            }
            if (PokemonType != 0)
            {
                hash ^= PokemonType.GetHashCode();
            }
            if (Power != 0F)
            {
                hash ^= Power.GetHashCode();
            }
            if (AccuracyChance != 0F)
            {
                hash ^= AccuracyChance.GetHashCode();
            }
            if (CriticalChance != 0F)
            {
                hash ^= CriticalChance.GetHashCode();
            }
            if (HealScalar != 0F)
            {
                hash ^= HealScalar.GetHashCode();
            }
            if (StaminaLossScalar != 0F)
            {
                hash ^= StaminaLossScalar.GetHashCode();
            }
            if (TrainerLevelMin != 0)
            {
                hash ^= TrainerLevelMin.GetHashCode();
            }
            if (TrainerLevelMax != 0)
            {
                hash ^= TrainerLevelMax.GetHashCode();
            }
            if (VfxName.Length != 0)
            {
                hash ^= VfxName.GetHashCode();
            }
            if (DurationMs != 0)
            {
                hash ^= DurationMs.GetHashCode();
            }
            if (DamageWindowStartMs != 0)
            {
                hash ^= DamageWindowStartMs.GetHashCode();
            }
            if (DamageWindowEndMs != 0)
            {
                hash ^= DamageWindowEndMs.GetHashCode();
            }
            if (EnergyDelta != 0)
            {
                hash ^= EnergyDelta.GetHashCode();
            }
            return(hash);
        }
Пример #7
0
 public override string ToString()
 {
     return($"FlashObservation: ObservationPoint = {ObservationPoint.ToString()}, Intensity = {Intensity.ToString()}, " +
            $"Duration(ms) = {DurationMs.ToString()}, ObservationTime = {ObservationTime.ToString()}, EstimatedValue = {EstimatedValue.ToString()}");
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (MovementId != 0)
            {
                hash ^= MovementId.GetHashCode();
            }
            if (AnimationId != 0)
            {
                hash ^= AnimationId.GetHashCode();
            }
            if (PokemonType != 0)
            {
                hash ^= PokemonType.GetHashCode();
            }
            if (Power != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Power);
            }
            if (AccuracyChance != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(AccuracyChance);
            }
            if (CriticalChance != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(CriticalChance);
            }
            if (HealScalar != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(HealScalar);
            }
            if (StaminaLossScalar != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(StaminaLossScalar);
            }
            if (TrainerLevelMin != 0)
            {
                hash ^= TrainerLevelMin.GetHashCode();
            }
            if (TrainerLevelMax != 0)
            {
                hash ^= TrainerLevelMax.GetHashCode();
            }
            if (VfxName.Length != 0)
            {
                hash ^= VfxName.GetHashCode();
            }
            if (DurationMs != 0)
            {
                hash ^= DurationMs.GetHashCode();
            }
            if (DamageWindowStartMs != 0)
            {
                hash ^= DamageWindowStartMs.GetHashCode();
            }
            if (DamageWindowEndMs != 0)
            {
                hash ^= DamageWindowEndMs.GetHashCode();
            }
            if (EnergyDelta != 0)
            {
                hash ^= EnergyDelta.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }