Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                hashcode = (hashcode * 397) + TraceIdLow.GetHashCode();
                hashcode = (hashcode * 397) + TraceIdHigh.GetHashCode();
                hashcode = (hashcode * 397) + SpanId.GetHashCode();
                hashcode = (hashcode * 397) + ParentSpanId.GetHashCode();
                hashcode = (hashcode * 397) + OperationName.GetHashCode();
                if (__isset.references)
                {
                    hashcode = (hashcode * 397) + TCollections.GetHashCode(References);
                }
                hashcode = (hashcode * 397) + Flags.GetHashCode();
                hashcode = (hashcode * 397) + StartTime.GetHashCode();
                hashcode = (hashcode * 397) + Duration.GetHashCode();
                if (__isset.tags)
                {
                    hashcode = (hashcode * 397) + TCollections.GetHashCode(Tags);
                }
                if (__isset.logs)
                {
                    hashcode = (hashcode * 397) + TCollections.GetHashCode(Logs);
                }
            }
            return(hashcode);
        }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (TraceIdHigh != 0UL)
            {
                hash ^= TraceIdHigh.GetHashCode();
            }
            if (TraceId != 0UL)
            {
                hash ^= TraceId.GetHashCode();
            }
            if (SpanId != 0UL)
            {
                hash ^= SpanId.GetHashCode();
            }
            if (parentSpanId_ != null)
            {
                hash ^= ParentSpanId.GetHashCode();
            }
            if (Sampled != false)
            {
                hash ^= Sampled.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 3
0
        internal static void Write <TWriter>(this TWriter @this, SpanId value) where TWriter : IBinaryTokenStreamWriter
        {
            @this.Write(value.GetHashCode());
            var array = SpanId.UnsafeGetArray(value);

            @this.Write((ushort)array.Length);
            @this.Write(array);
        }
Ejemplo n.º 4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = TraceId.GetHashCode();
         hashCode = (hashCode * 397) ^ SpanId.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 5
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = TraceId != null?TraceId.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (SpanId != null ? SpanId.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ParentId != null ? ParentId.GetHashCode() : 0);
                return(hashCode);
            }
        }
        public override int GetHashCode()
        {
            if (this == default)
            {
                return(0);
            }

            // HashCode.Combine would be the best but we need to compile for the full framework which require adding dependency
            // on the extensions package. Considering this simple type and hashing is not expected to be used much, we are implementing
            // the hashing manually.
            int hash = 5381;

            hash = ((hash << 5) + hash) + TraceId.GetHashCode();
            hash = ((hash << 5) + hash) + SpanId.GetHashCode();
            hash = ((hash << 5) + hash) + (int)TraceFlags;
            hash = ((hash << 5) + hash) + (TraceState == null ? 0 : TraceState.GetHashCode());

            return(hash);
        }
Ejemplo n.º 7
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (HasType)
            {
                hash ^= Type.GetHashCode();
            }
            if (HasValue)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Value);
            }
            if (HasTraceId)
            {
                hash ^= TraceId.GetHashCode();
            }
            if (HasSpanId)
            {
                hash ^= SpanId.GetHashCode();
            }
            if (HasParentSpanId)
            {
                hash ^= ParentSpanId.GetHashCode();
            }
            if (HasService)
            {
                hash ^= Service.GetHashCode();
            }
            if (HasStartDate)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(StartDate);
            }
            if (HasFinishDate)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(FinishDate);
            }
            hash ^= tags_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (TraceId != 0UL)
            {
                hash ^= TraceId.GetHashCode();
            }
            if (SpanId != 0UL)
            {
                hash ^= SpanId.GetHashCode();
            }
            if (Sampled != false)
            {
                hash ^= Sampled.GetHashCode();
            }
            hash ^= BaggageItems.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 9
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (TraceId.Length != 0)
            {
                hash ^= TraceId.GetHashCode();
            }
            if (SpanId.Length != 0)
            {
                hash ^= SpanId.GetHashCode();
            }
            if (ParentSpanId.Length != 0)
            {
                hash ^= ParentSpanId.GetHashCode();
            }
            if (SpanName.Length != 0)
            {
                hash ^= SpanName.GetHashCode();
            }
            if (startTime_ != null)
            {
                hash ^= StartTime.GetHashCode();
            }
            if (endTime_ != null)
            {
                hash ^= EndTime.GetHashCode();
            }
            hash ^= SpanTags.GetHashCode();
            if (HttpStatusCode != 0L)
            {
                hash ^= HttpStatusCode.GetHashCode();
            }
            if (ClientSpan != false)
            {
                hash ^= ClientSpan.GetHashCode();
            }
            if (RewriteClientSpanId != false)
            {
                hash ^= RewriteClientSpanId.GetHashCode();
            }
            if (SourceName.Length != 0)
            {
                hash ^= SourceName.GetHashCode();
            }
            if (sourceIp_ != null)
            {
                hash ^= SourceIp.GetHashCode();
            }
            if (DestinationName.Length != 0)
            {
                hash ^= DestinationName.GetHashCode();
            }
            if (destinationIp_ != null)
            {
                hash ^= DestinationIp.GetHashCode();
            }
            if (RequestSize != 0L)
            {
                hash ^= RequestSize.GetHashCode();
            }
            if (RequestTotalSize != 0L)
            {
                hash ^= RequestTotalSize.GetHashCode();
            }
            if (ResponseSize != 0L)
            {
                hash ^= ResponseSize.GetHashCode();
            }
            if (ResponseTotalSize != 0L)
            {
                hash ^= ResponseTotalSize.GetHashCode();
            }
            if (ApiProtocol.Length != 0)
            {
                hash ^= ApiProtocol.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }