Example #1
0
        public State search(State pocetnoStanje)
        {
            List <State> stanjaZaObradu = new List <State>();
            Hashtable    predjeniPut    = new Hashtable();

            stanjaZaObradu.Add(pocetnoStanje);

            while (stanjaZaObradu.Count > 0)
            {
                State naObradi = getBest(stanjaZaObradu);
                if (!predjeniPut.ContainsKey(naObradi.GetHashCode()))
                {
                    if (naObradi.isKrajnjeStanje())
                    {
                        return(naObradi);
                    }
                    predjeniPut.Add(naObradi.GetHashCode(), null);
                    List <State> sledecaStanja = naObradi.mogucaSledecaStanja();

                    foreach (State s in sledecaStanja)
                    {
                        stanjaZaObradu.Add(s);
                    }
                }
                stanjaZaObradu.Remove(naObradi);
            }
            return(null);
        }
Example #2
0
        // inbound.
        internal MsQuicStream(MsQuicConnection.State connectionState, SafeMsQuicStreamHandle streamHandle, QUIC_STREAM_OPEN_FLAGS flags)
        {
            _state.Handle          = streamHandle;
            _state.ConnectionState = connectionState;
            _canRead  = true;
            _canWrite = !flags.HasFlag(QUIC_STREAM_OPEN_FLAGS.UNIDIRECTIONAL);
            _started  = true;

            _stateHandle = GCHandle.Alloc(_state);
            try
            {
                MsQuicApi.Api.SetCallbackHandlerDelegate(
                    _state.Handle,
                    s_streamDelegate,
                    GCHandle.ToIntPtr(_stateHandle));
            }
            catch
            {
                _stateHandle.Free();
                throw;
            }

            if (NetEventSource.Log.IsEnabled())
            {
                NetEventSource.Info(
                    _state,
                    $"[Stream#{_state.GetHashCode()}] inbound {(_canWrite ? "bi" : "uni")}directional stream created " +
                    $"in Connection#{_state.ConnectionState.GetHashCode()}.");
            }
        }
Example #3
0
        // constructor for inbound connections
        public MsQuicConnection(IPEndPoint localEndPoint, IPEndPoint remoteEndPoint, SafeMsQuicConnectionHandle handle)
        {
            _state.Handle              = handle;
            _state.StateGCHandle       = GCHandle.Alloc(_state);
            _state.Connected           = true;
            _localEndPoint             = localEndPoint;
            _remoteEndPoint            = remoteEndPoint;
            _remoteCertificateRequired = false;
            _isServer = true;

            try
            {
                MsQuicApi.Api.SetCallbackHandlerDelegate(
                    _state.Handle,
                    s_connectionDelegate,
                    GCHandle.ToIntPtr(_state.StateGCHandle));
            }
            catch
            {
                _state.StateGCHandle.Free();
                throw;
            }

            if (NetEventSource.Log.IsEnabled())
            {
                NetEventSource.Info(_state, $"[Connection#{_state.GetHashCode()}] inbound connection created");
            }
        }
Example #4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (card_ != null)
            {
                hash ^= Card.GetHashCode();
            }
            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (amount_ != null)
            {
                hash ^= Amount.GetHashCode();
            }
            if (postedAt_ != null)
            {
                hash ^= PostedAt.GetHashCode();
            }
            if (receivedBy_ != null)
            {
                hash ^= ReceivedBy.GetHashCode();
            }
            if (refund_ != null)
            {
                hash ^= Refund.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (DisplayName.Length != 0)
            {
                hash ^= DisplayName.GetHashCode();
            }
            if (State != global::Google.Cloud.AIPlatform.V1.Execution.Types.State.Unspecified)
            {
                hash ^= State.GetHashCode();
            }
            if (Etag.Length != 0)
            {
                hash ^= Etag.GetHashCode();
            }
            hash ^= Labels.GetHashCode();
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (updateTime_ != null)
            {
                hash ^= UpdateTime.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (State != global::Google.Cloud.Orchestration.Airflow.Service.V1.OperationMetadata.Types.State.Unspecified)
            {
                hash ^= State.GetHashCode();
            }
            if (OperationType != global::Google.Cloud.Orchestration.Airflow.Service.V1.OperationMetadata.Types.Type.Unspecified)
            {
                hash ^= OperationType.GetHashCode();
            }
            if (Resource.Length != 0)
            {
                hash ^= Resource.GetHashCode();
            }
            if (ResourceUuid.Length != 0)
            {
                hash ^= ResourceUuid.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (endTime_ != null)
            {
                hash ^= EndTime.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #7
0
 public override int GetHashCode()
 {
     unchecked {
         return((state.GetHashCode() * 397) ^
                (join_interval != null ? join_interval.GetHashCode() : 0));
     }
 }
Example #8
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (State != global::Google.Cloud.Dataproc.V1.ClusterOperationStatus.Types.State.Unknown)
            {
                hash ^= State.GetHashCode();
            }
            if (InnerState.Length != 0)
            {
                hash ^= InnerState.GetHashCode();
            }
            if (Details.Length != 0)
            {
                hash ^= Details.GetHashCode();
            }
            if (stateStartTime_ != null)
            {
                hash ^= StateStartTime.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #9
0
        public void State_GetHashCode_WhenUncoded_ReturnsNameHash()
        {
            var name  = "state";
            var state = new State <StubStateModel>(name);

            Assert.Equal(name.GetHashCode(), state.GetHashCode());
        }
Example #10
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (ProposalId != null)
         {
             hashCode = hashCode * 59 + ProposalId.GetHashCode();
         }
         if (IssuerId != null)
         {
             hashCode = hashCode * 59 + IssuerId.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (PrevProposalId != null)
         {
             hashCode = hashCode * 59 + PrevProposalId.GetHashCode();
         }
         return(hashCode);
     }
 }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Category != null)
         {
             hashCode = hashCode * 59 + Category.GetHashCode();
         }
         if (Tags != null)
         {
             hashCode = hashCode * 59 + Tags.GetHashCode();
         }
         if (GroupNames != null)
         {
             hashCode = hashCode * 59 + GroupNames.GetHashCode();
         }
         if (Link != null)
         {
             hashCode = hashCode * 59 + Link.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (TransformedState != null)
         {
             hashCode = hashCode * 59 + TransformedState.GetHashCode();
         }
         if (StateDescription != null)
         {
             hashCode = hashCode * 59 + StateDescription.GetHashCode();
         }
         if (CommandDescription != null)
         {
             hashCode = hashCode * 59 + CommandDescription.GetHashCode();
         }
         if (Metadata != null)
         {
             hashCode = hashCode * 59 + Metadata.GetHashCode();
         }
         if (Editable != null)
         {
             hashCode = hashCode * 59 + Editable.GetHashCode();
         }
         return(hashCode);
     }
 }
        ///<inheritdoc/>
        public override int GetHashCode()
        {
            int hash = 17;

            // Overflow is fine, just wrap
            unchecked
            {
                hash = (hash * 29) + PaintScheme.GetHashCode();
                hash = (hash * 29) + Mobility.GetHashCode();
                hash = (hash * 29) + Mission.GetHashCode();
                hash = (hash * 29) + Damage.GetHashCode();
                hash = (hash * 29) + Smoke.GetHashCode();
                hash = (hash * 29) + TrailingEffects.GetHashCode();
                hash = (hash * 29) + Lights.GetHashCode();
                hash = (hash * 29) + Flaming.GetHashCode();
                hash = (hash * 29) + Antenna.GetHashCode();
                hash = (hash * 29) + CamouflageType.GetHashCode();
                hash = (hash * 29) + Concealed.GetHashCode();
                hash = (hash * 29) + FrozenStatus.GetHashCode();
                hash = (hash * 29) + PowerPlantStatus.GetHashCode();
                hash = (hash * 29) + State.GetHashCode();
                hash = (hash * 29) + Tent.GetHashCode();
                hash = (hash * 29) + BlackoutLights.GetHashCode();
                hash = (hash * 29) + InteriorLights.GetHashCode();
            }

            return(hash);
        }
Example #13
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Address1.Length != 0)
            {
                hash ^= Address1.GetHashCode();
            }
            if (Address2.Length != 0)
            {
                hash ^= Address2.GetHashCode();
            }
            if (City.Length != 0)
            {
                hash ^= City.GetHashCode();
            }
            if (State.Length != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (ZipCode.Length != 0)
            {
                hash ^= ZipCode.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #14
0
        protected override bool OnExposeEvent(Gdk.EventExpose evnt)
        {
            using (var cr = Gdk.CairoHelper.Create(evnt.Window)) {
                cr.Rectangle(0, 0, Allocation.Width, Allocation.Height);
                using (LinearGradient gr = new LinearGradient(0, 0, 0, Allocation.Height)) {
                    gr.AddColorStop(0, this.Style.Backgrounds[State.GetHashCode()].ToCairoColor());
                    gr.AddColorStop(1, this.Style.Backgrounds[State.GetHashCode()].ToCairoColor());
                    cr.SetSource(gr);
                }
                cr.Fill();

                cr.MoveTo(0.5, 0.5);
                cr.Line(0.5, 0.5, Allocation.Width - 1, 0.5);
                cr.SetSourceRGB(1, 1, 1);
                cr.LineWidth = 1;
                cr.Stroke();

                for (int i = tabs.Count; i-- > 0;)
                {
                    if (i == ActiveTab)
                    {
                        continue;
                    }
                    var tab    = tabs[i];
                    var bounds = GetBounds(tab);
                    tab.HoverPosition = tab == hoverTab ? new Cairo.PointD(mx - bounds.X, my) : new Cairo.PointD(-1, -1);
                    tab.Draw(cr, bounds);
                }

                tabs[ActiveTab].Draw(cr, GetBounds(tabs[ActiveTab]));
            }
            return(base.OnExposeEvent(evnt));
        }
        public void EquivalentStatesGiveSameHash()
        {
            /*
             *  F4 .   .   .   .   .
             *  F3 .   .   .   LiG .
             *  F2 .   HyG .   .   .
             *  F1 [E] .   HyM .   LiM
             *
             *  is equivalent to:
             *
             *  F4 .   .   .   .   .
             *  F3 .   HyG .   .   .
             *  F2 .   .   .   LiG .
             *  F1 [E] .   HyM .   LiM
             *
             */

            var state1 = new State {
                Items = new[] { 1, 0, 2, 0 }, Elements = new[] { "Hy", "Li" }
            };
            var state2 = new State {
                Items = new[] { 2, 0, 1, 0 }, Elements = new[] { "Hy", "Li" }
            };

            Assert.IsTrue(state1.Equals(state2));
            Assert.AreEqual(state1.GetHashCode(), state2.GetHashCode());
            var set = new HashSet <State> {
                state1
            };

            Assert.IsTrue(set.Contains(state1));
            Assert.IsTrue(set.Contains(state2));
        }
        ///<inheritdoc/>
        public override int GetHashCode()
        {
            int hash = 17;

            // Overflow is fine, just wrap
            unchecked
            {
                hash = (hash * 29) + PaintScheme.GetHashCode();
                hash = (hash * 29) + Propulsion.GetHashCode();
                hash = (hash * 29) + Damage.GetHashCode();
                hash = (hash * 29) + Smoke.GetHashCode();
                hash = (hash * 29) + TrailingEffects.GetHashCode();
                hash = (hash * 29) + Canopy.GetHashCode();
                hash = (hash * 29) + LandingLights.GetHashCode();
                hash = (hash * 29) + NavigationLights.GetHashCode();
                hash = (hash * 29) + AntiCollisionLights.GetHashCode();
                hash = (hash * 29) + Flaming.GetHashCode();
                hash = (hash * 29) + Afterburner.GetHashCode();
                hash = (hash * 29) + FrozenStatus.GetHashCode();
                hash = (hash * 29) + PowerPlantStatus.GetHashCode();
                hash = (hash * 29) + State.GetHashCode();
                hash = (hash * 29) + FormationLights.GetHashCode();
                hash = (hash * 29) + SpotLights.GetHashCode();
                hash = (hash * 29) + InteriorLights.GetHashCode();
            }

            return(hash);
        }
Example #17
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (AddressLine1 != null)
         {
             hashCode = hashCode * 59 + AddressLine1.GetHashCode();
         }
         if (AddressLine2 != null)
         {
             hashCode = hashCode * 59 + AddressLine2.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (Zip != null)
         {
             hashCode = hashCode * 59 + Zip.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         return(hashCode);
     }
 }
Example #18
0
        public override int GetHashCode()
        {
            int hashCode = 1605817888;

            if (OrderId != null)
            {
                hashCode += OrderId.GetHashCode();
            }

            if (Version != null)
            {
                hashCode += Version.GetHashCode();
            }

            if (LocationId != null)
            {
                hashCode += LocationId.GetHashCode();
            }

            if (State != null)
            {
                hashCode += State.GetHashCode();
            }

            if (CreatedAt != null)
            {
                hashCode += CreatedAt.GetHashCode();
            }

            return(hashCode);
        }
Example #19
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (destroyTime_ != null)
            {
                hash ^= DestroyTime.GetHashCode();
            }
            if (destroyEventTime_ != null)
            {
                hash ^= DestroyEventTime.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #20
0
 public Player(Animation[] anims, float imageScale, Vector2 loc, InputManager input) : base(anims, imageScale, loc)
 {
     _input      = input;
     NewLogEntry = new TestLogEntry(null, State.GetHashCode());
     LogList.Add(NewLogEntry);
     MoveDist = new Vector2(6, 0);
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (response_ != null)
            {
                hash ^= Response.GetHashCode();
            }
            if (userCase_ == UserOneofCase.Coordinator)
            {
                hash ^= Coordinator.GetHashCode();
            }
            if (userCase_ == UserOneofCase.Player)
            {
                hash ^= Player.GetHashCode();
            }
            if (state_ != null)
            {
                hash ^= State.GetHashCode();
            }
            if (ServerVersion != 0)
            {
                hash ^= ServerVersion.GetHashCode();
            }
            hash ^= (int)userCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #22
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Status != 0)
            {
                hash ^= Status.GetHashCode();
            }
            if (state_ != null)
            {
                hash ^= State.GetHashCode();
            }
            if (playerSnapshot_ != null)
            {
                hash ^= PlayerSnapshot.GetHashCode();
            }
            if (PartnerId.Length != 0)
            {
                hash ^= PartnerId.GetHashCode();
            }
            if (FortressCooldownLeftMs != 0UL)
            {
                hash ^= FortressCooldownLeftMs.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (AgentVersion.Length != 0)
            {
                hash ^= AgentVersion.GetHashCode();
            }
            if (State != global::Google.Cloud.Dialogflow.V2.Environment.Types.State.Unspecified)
            {
                hash ^= State.GetHashCode();
            }
            if (updateTime_ != null)
            {
                hash ^= UpdateTime.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #24
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Street.Length != 0)
            {
                hash ^= Street.GetHashCode();
            }
            if (State.Length != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (ZipCode.Length != 0)
            {
                hash ^= ZipCode.GetHashCode();
            }
            if (PersonId != 0)
            {
                hash ^= PersonId.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #25
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (InnerState.Length != 0)
            {
                hash ^= InnerState.GetHashCode();
            }
            if (Details.Length != 0)
            {
                hash ^= Details.GetHashCode();
            }
            if (stateStartTime_ != null)
            {
                hash ^= StateStartTime.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0UL)
            {
                hash ^= Id.GetHashCode();
            }
            if (PlayerCount != 0)
            {
                hash ^= PlayerCount.GetHashCode();
            }
            if (PlayerMax != 0)
            {
                hash ^= PlayerMax.GetHashCode();
            }
            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (BattleType != 0)
            {
                hash ^= BattleType.GetHashCode();
            }
            if (ServerMs != 0L)
            {
                hash ^= ServerMs.GetHashCode();
            }
            hash ^= battleActions_.GetHashCode();
            if (BattleStartTimestampMs != 0L)
            {
                hash ^= BattleStartTimestampMs.GetHashCode();
            }
            if (BattleEndTimestampMs != 0L)
            {
                hash ^= BattleEndTimestampMs.GetHashCode();
            }
            return(hash);
        }
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Origin?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Destination?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (DaysOfWeek?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PricePerPallet?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PricePerKilogram?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PricePerCubicMeter?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (TotalAvailableCapacityKG?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (EffectiveFrom?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (EffectiveTo?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (TypeOfGoods?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Revision?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (GUID?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ReservedCapacityLaden?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (State?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (BaseId?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Frequency?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (TotalAvailableCapacityM3?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (TotalAvailableCapacityLaden?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ReservedCapacityKG?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ReservedCapacityM3?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (FixedPrice?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (OriginComments?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (DestinationComments?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (TruckPlate?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (stringenum?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (DeliveryDate?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Attribute?.GetHashCode() ?? 0);
            return(hashCode);
        }
Example #29
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CustomerID;
         hashCode = (hashCode * 397) ^ (CustomerName != null ? CustomerName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (BusinessNumber != null ? BusinessNumber.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Domain != null ? Domain.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Address != null ? Address.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (State != null ? State.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Country != null ? Country.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ZipCode != null ? ZipCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Phone != null ? Phone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Fax != null ? Fax.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Notes != null ? Notes.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Logo != null ? Logo.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Website != null ? Website.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Longitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Latitude.GetHashCode();
         hashCode = (hashCode * 397) ^ CreatedOn.GetHashCode();
         hashCode = (hashCode * 397) ^ LastModified.GetHashCode();
         return(hashCode);
     }
 }
Example #30
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (State != global::Google.Cloud.DocumentAI.V1Beta3.CommonOperationMetadata.Types.State.Unspecified)
            {
                hash ^= State.GetHashCode();
            }
            if (StateMessage.Length != 0)
            {
                hash ^= StateMessage.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (updateTime_ != null)
            {
                hash ^= UpdateTime.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #31
0
        public void State_GetHashCode_WhenCoded_ReturnsCodeHash()
        {
            var code = (int?)5;
            var name = "state";
            var state = new State<StubStateModel>(name, code);

            Assert.Equal(code.GetHashCode(), state.GetHashCode());
        }
Example #32
0
        public void State_GetHashCode_WhenUncoded_ReturnsNameHash()
        {
            var name = "state";
            var state = new State<StubStateModel>(name);

            Assert.Equal(name.GetHashCode(), state.GetHashCode());
        }