AspNetCore.Docs/aspnetcore/fundamentals/static-files/sample/StartupStaticFiles.cs

27 lines
775 B
C#
Raw Normal View History

2016-10-29 01:35:15 +08:00
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
namespace StaticFiles
{
public class StartupStaticFiles
{
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
#region snippet1
public void Configure(IApplicationBuilder app)
2016-10-29 01:35:15 +08:00
{
app.UseStaticFiles();
}
#endregion
}
}