private static Segment GetSegment(string uri, string method, CrossApplicationResponseData catResponseData = null)
        {
            var data    = new ExternalSegmentData(new Uri(uri), method, catResponseData);
            var builder = new Segment(TransactionSegmentStateHelpers.GetItransactionSegmentState(), new MethodCallData("foo", "bar", 1));

            builder.SetSegmentData(data);
            builder.End();
            return(builder);
        }
示例#2
0
        public static Segment createExternalSegmentBuilder(TimeSpan relativeStart, TimeSpan duration, int uniqueId, int?parentId, MethodCallData methodCallData, IEnumerable <KeyValuePair <string, object> > parameters, Uri uri, string method, CrossApplicationResponseData crossApplicationResponseData, bool combinable)
        {
            var data    = new ExternalSegmentData(uri, method, crossApplicationResponseData);
            var segment = new Segment(SimpleSegmentDataTests.createTransactionSegmentState(uniqueId, parentId), methodCallData);

            segment.SetSegmentData(data);
            segment.Combinable = combinable;

            return(segment);
        }
        private static Segment GetSegment(string uri, string method, double duration, CrossApplicationResponseData catResponseData = null)
        {
            var methodCallData = new MethodCallData("foo", "bar", 1);

            var data    = new ExternalSegmentData(new Uri(uri), method, catResponseData);
            var segment = new Segment(TransactionSegmentStateHelpers.GetItransactionSegmentState(), methodCallData);

            segment.SetSegmentData(data);

            return(new Segment(new TimeSpan(), TimeSpan.FromSeconds(duration), segment, null));
        }