Exemplo n.º 1
0
        private static SegmentReference MapToSegmentReference(SegmentReferenceRequest referenceRequest)
        {
            var reference = new SegmentReference
            {
                ParentServiceInstanceId = referenceRequest.ParentServiceInstanceId,
                EntryServiceInstanceId  = referenceRequest.EntryServiceInstanceId,
                ParentSpanId            = referenceRequest.ParentSpanId,
                RefType = (RefType)referenceRequest.RefType,
                ParentTraceSegmentId = MapToUniqueId(referenceRequest.ParentSegmentId)
            };

            ReadStringOrIntValue(reference, referenceRequest.NetworkAddress, NetworkAddressReader,
                                 NetworkAddressIdReader);
            ReadStringOrIntValue(reference, referenceRequest.EntryEndpointName, EntryEndpointReader,
                                 EntryEndpointIdReader);
            ReadStringOrIntValue(reference, referenceRequest.ParentEndpointName, ParentEndpointReader,
                                 ParentEndpointIdReader);

            return(reference);
        }