예제 #1
0
        private static void GetJsonReaderException(ref Utf8JsonReader json)
        {
            var jsonInstrumented = new Instrumented.Utf8JsonReader(json._buffer, json._isFinalBlock,
                                                                   json._isRetry ? json.State : default)
            {
                MaxDepth = json.MaxDepth
            };

            while (jsonInstrumented.Read())
            {
                ;
            }
            Debug.Assert(false, "We should never reach this point since we should have thrown JsonReaderException already.");
        }
예제 #2
0
        public string GetXml()
        {
            var sb = new StringBuilder();

            sb.AppendFormat(
                @"<method name=""{0}"" excluded=""{1}"" instrumented=""{2}"" class=""{3}"">",
                HttpUtility.HtmlEncode(Name),
                Excluded.ToString().ToLower(),
                Instrumented.ToString().ToLower(),
                HttpUtility.HtmlEncode(Class)
                );
            sb.AppendLine();
            foreach (var point in Points)
            {
                sb.AppendLine(point.GetXml());
            }
            sb.Append("</method>");

            return(sb.ToString());
        }
예제 #3
0
 private static void RunFooBar()
 {
     Instrumented.Foo();
     NotInstrumented.Bar();
 }