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); }
private ApplicationBuilder(ApplicationBuilder builder) { Properties = new CopyOnWriteDictionary <string, object>(builder.Properties, StringComparer.Ordinal); }
private ApplicationBuilder(ApplicationBuilder builder) { Properties = builder.Properties; }