Esempio n. 1
0
        public async Task TransientCallC(IHttpContext context)
        {
            if (!context.Contains("PathParameters"))
            {
                context.Set("PathParameters", new StringBuilder());
            }
            var sb = context.GetAs <StringBuilder>("PathParameters");

            sb.Append($"C{Counter}: Count: {context.Request.PathParameters.Count}{Environment.NewLine}");
            sb.Append($"\tthing1: {context.Request.PathParameters["thing1"]}{Environment.NewLine}");
            sb.Append($"\tthing2: {context.Request.PathParameters["thing2"]}{Environment.NewLine}");

            await context.Response.SendResponseAsync($"{sb.ToString()}{Environment.NewLine}");
        }
Esempio n. 2
0
        public async Task TransientCallB(IHttpContext context)
        {
            if (!context.Contains("PathParameters"))
            {
                context.Set("PathParameters", new StringBuilder());
            }
            var sb = context.GetAs <StringBuilder>("PathParameters");

            sb.Append($"B{Counter}: Count: {context.Request.PathParameters.Count}{Environment.NewLine}");
            sb.Append($"\tp0: {context.Request.PathParameters["p0"]}{Environment.NewLine}");
            sb.Append($"\tp1: {context.Request.PathParameters["p1"]}{Environment.NewLine}");

            await Task.CompletedTask;
        }