// Copyright (c) Microsoft Open Technologies, Inc. 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; namespace Microsoft.AspNet.Mvc.Razor { /// /// Represents configuration options for the Razor Host /// public class MvcRazorHostOptions { public MvcRazorHostOptions() { DefaultModel = "dynamic"; ActivateAttributeName = "Microsoft.AspNet.Mvc.ActivateAttribute"; DefaultInjectedProperties = new List() { new InjectDescriptor("Microsoft.AspNet.Mvc.Rendering.IHtmlHelper", "Html"), new InjectDescriptor("Microsoft.AspNet.Mvc.IViewComponentHelper", "Component"), new InjectDescriptor("Microsoft.AspNet.Mvc.IUrlHelper", "Url"), }; } /// /// Gets or sets the model that is used by default for generated views /// when no model is explicily specified. Defaults to dynamic. /// public string DefaultModel { get; set; } /// /// Gets or sets the attribue that is used to decorate properties that are injected and need to /// be activated. /// public string ActivateAttributeName { get; set; } /// /// Gets the list of properties that are injected by default. /// public IList DefaultInjectedProperties { get; private set; } } }