コード例 #1
0
        public void BuildImplicitlyCallsMatchedEndpointAsLastStep()
        {
            var builder = new ApplicationBuilder(null);
            var app     = builder.Build();

            var endpointCalled = false;
            var endpoint       = new Endpoint(
                context =>
            {
                endpointCalled = true;
                return(Task.CompletedTask);
            },
                EndpointMetadataCollection.Empty,
                "Test endpoint");

            var httpContext = new DefaultHttpContext();

            httpContext.SetEndpoint(endpoint);

            app.Invoke(httpContext);

            Assert.True(endpointCalled);
        }
コード例 #2
0
 private ApplicationBuilder(ApplicationBuilder builder)
 {
     Properties = new CopyOnWriteDictionary <string, object>(builder.Properties, StringComparer.Ordinal);
 }
コード例 #3
0
 private ApplicationBuilder(ApplicationBuilder builder)
 {
     Properties = builder.Properties;
 }