// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Microsoft.AspNet.StaticFiles.Infrastructure; namespace Microsoft.AspNet.StaticFiles { /// /// Options for selecting default file names. /// public class DefaultFilesOptions : SharedOptionsBase { /// /// Configuration for the DefaultFilesMiddleware. /// public DefaultFilesOptions() : this(new SharedOptions()) { } /// /// Configuration for the DefaultFilesMiddleware. /// /// public DefaultFilesOptions(SharedOptions sharedOptions) : base(sharedOptions) { // Prioritized list DefaultFileNames = new List() { "default.htm", "default.html", "index.htm", "index.html", }; } /// /// An ordered list of file names to select by default. List length and ordering may affect performance. /// [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Improves usability")] public IList DefaultFileNames { get; set; } } }