// 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; using Microsoft.AspNet.Mvc.Filters; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNet.Mvc.ViewFeatures { /// /// Adds a filter which will save the for a request. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public class SaveTempDataAttribute : Attribute, IFilterFactory, IOrderedFilter { /// public int Order { get; set; } /// public bool IsReusable => true; /// public IFilterMetadata CreateInstance(IServiceProvider serviceProvider) { return serviceProvider.GetRequiredService(); } } }