public override int GetHashCode() { int hc = 13; hc += EventId.GetHashCode() * 27; return hc; }
public override int GetHashCode() { int hash = 1; if (RequestId.Length != 0) { hash ^= RequestId.GetHashCode(); } if (EventId.Length != 0) { hash ^= EventId.GetHashCode(); } if (createTime_ != null) { hash ^= CreateTime.GetHashCode(); } if (eventCase_ == EventOneofCase.JobEvent) { hash ^= JobEvent.GetHashCode(); } if (eventCase_ == EventOneofCase.ProfileEvent) { hash ^= ProfileEvent.GetHashCode(); } if (EventNotes.Length != 0) { hash ^= EventNotes.GetHashCode(); } hash ^= (int)eventCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (eventId_ != null) { hash ^= EventId.GetHashCode(); } if (source_ != null) { hash ^= Source.GetHashCode(); } if (correlationId_ != null) { hash ^= CorrelationId.GetHashCode(); } if (artifact_ != null) { hash ^= Artifact.GetHashCode(); } if (Occurred != 0L) { hash ^= Occurred.GetHashCode(); } if (originalContext_ != null) { hash ^= OriginalContext.GetHashCode(); } return(hash); }
/// <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 (EventId != null) { hashCode = hashCode * 59 + EventId.GetHashCode(); } if (Topic != null) { hashCode = hashCode * 59 + Topic.GetHashCode(); } if (Rating != null) { hashCode = hashCode * 59 + Rating.GetHashCode(); } if (Comment != null) { hashCode = hashCode * 59 + Comment.GetHashCode(); } if (Sentiment != null) { hashCode = hashCode * 59 + Sentiment.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (EventId.Length != 0) { hash ^= EventId.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (guild_ != null) { hash ^= Guild.GetHashCode(); } if (infoChannel_ != null) { hash ^= InfoChannel.GetHashCode(); } hash ^= qualifierMaps_.GetHashCode(); if (SendScoresToInfoChannel != false) { hash ^= SendScoresToInfoChannel.GetHashCode(); } if (Flags != 0) { hash ^= Flags.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void TestEventIdBasic() { EventId eventId = 42; Assert.Equal(42, eventId.Id); Assert.Null(eventId.Name); Assert.Equal("42", eventId.ToString()); Assert.Equal(42, eventId.GetHashCode()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks if (Id != null) { hash = hash * 59 + Id.GetHashCode(); } if (EventId != null) { hash = hash * 59 + EventId.GetHashCode(); } if (Event2Id != null) { hash = hash * 59 + Event2Id.GetHashCode(); } if (HasBeenViewed != null) { hash = hash * 59 + HasBeenViewed.GetHashCode(); } if (IsWatchNotification != null) { hash = hash * 59 + IsWatchNotification.GetHashCode(); } if (IsExpired != null) { hash = hash * 59 + IsExpired.GetHashCode(); } if (IsAllDay != null) { hash = hash * 59 + IsAllDay.GetHashCode(); } if (PriorityCode != null) { hash = hash * 59 + PriorityCode.GetHashCode(); } if (UserId != null) { hash = hash * 59 + UserId.GetHashCode(); } return(hash); } }
public override int GetHashCode() { unchecked { var hashCode = StatusCode.GetHashCode(); hashCode = (hashCode * 397) ^ (Message != null ? Message.GetHashCode() : 0); hashCode = (hashCode * 397) ^ EventId.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ SeatNumber; hashCode = (hashCode * 397) ^ Price.GetHashCode(); hashCode = (hashCode * 397) ^ EventId.GetHashCode(); hashCode = (hashCode * 397) ^ UserId.GetHashCode(); hashCode = (hashCode * 397) ^ (UserName != null ? UserName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ PurchaseDate.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = EventId?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (BeaconId?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ActionTime?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Location?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ Trigger; hashCode = (hashCode * 397) ^ Delivered.GetHashCode(); hashCode = (hashCode * 397) ^ Background.GetHashCode(); return(hashCode); } }
/// <inheritdoc /> public override int GetHashCode() { unchecked { // Choose large primes to avoid hashing collisions const int HashingBase = (int)2166136261; const int HashingMultiplier = 16777619; int hash = HashingBase; hash = (hash * HashingMultiplier) ^ (EventId is object?EventId.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (CorrelationId is object?CorrelationId.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (EventName is object?EventName.GetHashCode() : 0); return(hash); } }
public override int GetHashCode() { int hash = 1; if (EventId.Length != 0) { hash ^= EventId.GetHashCode(); } if (parameters_ != null) { hash ^= Parameters.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (EventId != 0UL) { hash ^= EventId.GetHashCode(); } if (EventType != 0) { hash ^= EventType.GetHashCode(); } if (valueTypeCase_ == ValueTypeOneofCase.LongValue) { hash ^= LongValue.GetHashCode(); } if (valueTypeCase_ == ValueTypeOneofCase.DoubleValue) { hash ^= DoubleValue.GetHashCode(); } if (valueTypeCase_ == ValueTypeOneofCase.SkeletonValue) { hash ^= SkeletonValue.GetHashCode(); } if (valueTypeCase_ == ValueTypeOneofCase.ObjectValue) { hash ^= ObjectValue.GetHashCode(); } if (valueTypeCase_ == ValueTypeOneofCase.StringValue) { hash ^= StringValue.GetHashCode(); } if (valueTypeCase_ == ValueTypeOneofCase.CustomValue) { hash ^= CustomValue.GetHashCode(); } if (appTypeCase_ == AppTypeOneofCase.AppId) { hash ^= AppId.GetHashCode(); } hash ^= (int)valueTypeCase_; hash ^= (int)appTypeCase_; return(hash); }
public override int GetHashCode() { unchecked { int result = LogPosition.GetHashCode(); result = (result * 397) ^ Flags.GetHashCode(); result = (result * 397) ^ TransactionPosition.GetHashCode(); result = (result * 397) ^ TransactionOffset; result = (result * 397) ^ ExpectedVersion.GetHashCode(); result = (result * 397) ^ EventStreamId.GetHashCode(); result = (result * 397) ^ EventId.GetHashCode(); result = (result * 397) ^ CorrelationId.GetHashCode(); result = (result * 397) ^ TimeStamp.GetHashCode(); result = (result * 397) ^ EventType.GetHashCode(); result = (result * 397) ^ Data.GetHashCode(); result = (result * 397) ^ Metadata.GetHashCode(); return(result); } }
/// <summary> /// Check that both EventHelper.CreateEventId and the EventId constructor proper create the same thing /// </summary> public void EventHelperShouldCreateExactSameEventViaAnyConstructor() { var subSystem = LogEventIds.LogEventIdSubsystem.Encode; var level = LogEventIds.LogEventIdLevel.Debug; var index = 22; var msgText = "Some interesting text"; int computedId = ((int)level * 100000) + ((int)subSystem * 1000) + index; int ehComputedId = LogEventIds.GenerateId(level, subSystem, index); var ev1 = new EventId(computedId, msgText); var ev2 = EventHelpers.CreateEventId(subSystem, level, index, msgText); ehComputedId.ShouldBe(computedId, "LogEventIds.GenerateId != computed ID"); ev1.GetLevelName().ShouldBe(ev2.GetLevelName()); ev1.GetSubsystemName().ShouldBe(ev2.GetSubsystemName()); ev1.Id.ShouldBe(ev2.Id); ev1.Name.ShouldBe(ev2.Name); ev1.GetHashCode().ShouldBe(ev2.GetHashCode()); }
public override int GetHashCode() { int hash = 1; if (EventId.Length != 0) { hash ^= EventId.GetHashCode(); } if (parameters_ != null) { hash ^= Parameters.GetHashCode(); } if (UserId.Length != 0) { hash ^= UserId.GetHashCode(); } if (Username.Length != 0) { hash ^= Username.GetHashCode(); } if (Score_ != 0) { hash ^= Score_.GetHashCode(); } if (FullCombo != false) { hash ^= FullCombo.GetHashCode(); } if (Color.Length != 0) { hash ^= Color.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { return(EventId.GetHashCode() ^ Data.GetHashCode()); }
public void Log <TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func <TState, Exception, string> formatter) { var provider = _provider.DuckCast <Datadog.Trace.ClrProfiler.AutoInstrumentation.Logging.ILogger.DirectSubmission.IExternalScopeProvider>(); var logEntry = new LogEntry <TState>(_timestamp, (int)logLevel, "some_cat", eventId.GetHashCode(), state, exception, formatter, provider); var log = LoggerLogFormatter.FormatLogEvent(_formatter, in logEntry); Logs.Add(log); }
public override int GetHashCode() { return(EventId.GetHashCode() + EventHandlerTypeName.GetHashCode()); }
public override int GetHashCode() { int num = 1; if (EventType != 0) { num ^= EventType.GetHashCode(); } if (EventId != 0) { num ^= EventId.GetHashCode(); } if (parentEventId_.HasValue) { num ^= ParentEventId.GetHashCode(); } if (Int1 != 0) { num ^= Int1.GetHashCode(); } if (Int2 != 0) { num ^= Int2.GetHashCode(); } if (Int3 != 0) { num ^= Int3.GetHashCode(); } if (Int4 != 0) { num ^= Int4.GetHashCode(); } if (Int5 != 0) { num ^= Int5.GetHashCode(); } if (Int6 != 0) { num ^= Int6.GetHashCode(); } if (Int7 != 0) { num ^= Int7.GetHashCode(); } if (String1.Length != 0) { num ^= String1.GetHashCode(); } if (Bool1) { num ^= Bool1.GetHashCode(); } if (cellCoord1_ != null) { num ^= CellCoord1.GetHashCode(); } if (cellCoord2_ != null) { num ^= CellCoord2.GetHashCode(); } if (CompanionReserveState1 != 0) { num ^= CompanionReserveState1.GetHashCode(); } if (CompanionReserveState2 != 0) { num ^= CompanionReserveState2.GetHashCode(); } if (DamageReductionType1 != 0) { num ^= DamageReductionType1.GetHashCode(); } if (FightResult1 != 0) { num ^= FightResult1.GetHashCode(); } if (gameStatistics1_ != null) { num ^= GameStatistics1.GetHashCode(); } if (TeamsScoreModificationReason1 != 0) { num ^= TeamsScoreModificationReason1.GetHashCode(); } if (optInt1_.HasValue) { num ^= OptInt1.GetHashCode(); } if (optInt2_.HasValue) { num ^= OptInt2.GetHashCode(); } if (optInt3_.HasValue) { num ^= OptInt3.GetHashCode(); } if (optInt4_.HasValue) { num ^= OptInt4.GetHashCode(); } num ^= ((object)cellCoordList1_).GetHashCode(); num ^= ((object)spellMovementList1_).GetHashCode(); num ^= ((object)castTargetList1_).GetHashCode(); num ^= ((object)intList1_).GetHashCode(); num ^= ((object)intList2_).GetHashCode(); if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return(num); }
public override int GetHashCode() => (ServiceId != null && EventId != null) ? ServiceId.GetHashCode() ^ EventId.GetHashCode() : base.GetHashCode();
/// <inheritdoc /> public override int GetHashCode() { unchecked { // Choose large primes to avoid hashing collisions const int HashingBase = (int)2166136261; const int HashingMultiplier = 16777619; int hash = HashingBase; hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, EventId) ? EventId.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, TelemetryCorrelationId) ? TelemetryCorrelationId.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, EventName) ? EventName.GetHashCode() : 0); return(hash); } }
public override int GetHashCode() { return(EventId.GetHashCode() + Result.GetHashCode()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { var hash = 41; // Suitable nullity checks etc, of course :) if (Venue != null) { hash = hash * 59 + Venue.GetHashCode(); } if (SettledTime != null) { hash = hash * 59 + SettledTime.GetHashCode(); } if (Timezone != null) { hash = hash * 59 + Timezone.GetHashCode(); } if (EachWayDivisor != null) { hash = hash * 59 + EachWayDivisor.GetHashCode(); } if (Regulators != null) { hash = hash * 59 + Regulators.GetHashCode(); } if (MarketType != null) { hash = hash * 59 + MarketType.GetHashCode(); } if (MarketBaseRate != null) { hash = hash * 59 + MarketBaseRate.GetHashCode(); } if (NumberOfWinners != null) { hash = hash * 59 + NumberOfWinners.GetHashCode(); } if (CountryCode != null) { hash = hash * 59 + CountryCode.GetHashCode(); } if (InPlay != null) { hash = hash * 59 + InPlay.GetHashCode(); } if (BetDelay != null) { hash = hash * 59 + BetDelay.GetHashCode(); } if (BspMarket != null) { hash = hash * 59 + BspMarket.GetHashCode(); } if (BettingType != null) { hash = hash * 59 + BettingType.GetHashCode(); } if (NumberOfActiveRunners != null) { hash = hash * 59 + NumberOfActiveRunners.GetHashCode(); } if (EventId != null) { hash = hash * 59 + EventId.GetHashCode(); } if (CrossMatching != null) { hash = hash * 59 + CrossMatching.GetHashCode(); } if (RunnersVoidable != null) { hash = hash * 59 + RunnersVoidable.GetHashCode(); } if (TurnInPlayEnabled != null) { hash = hash * 59 + TurnInPlayEnabled.GetHashCode(); } if (SuspendTime != null) { hash = hash * 59 + SuspendTime.GetHashCode(); } if (DiscountAllowed != null) { hash = hash * 59 + DiscountAllowed.GetHashCode(); } if (PersistenceEnabled != null) { hash = hash * 59 + PersistenceEnabled.GetHashCode(); } if (Runners != null) { hash = hash * 59 + Runners.GetHashCode(); } if (Version != null) { hash = hash * 59 + Version.GetHashCode(); } if (EventTypeId != null) { hash = hash * 59 + EventTypeId.GetHashCode(); } if (Complete != null) { hash = hash * 59 + Complete.GetHashCode(); } if (OpenDate != null) { hash = hash * 59 + OpenDate.GetHashCode(); } if (MarketTime != null) { hash = hash * 59 + MarketTime.GetHashCode(); } if (BspReconciled != null) { hash = hash * 59 + BspReconciled.GetHashCode(); } if (Status != null) { hash = hash * 59 + Status.GetHashCode(); } return(hash); } }