This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConfigValue | |
{ | |
public string Key { get; set; } | |
public string Value { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Web.Mvc | |
{ | |
[SuppressMessage( | |
"Microsoft.Maintainability", | |
"CA1506:AvoidExcessiveClassCoupling", | |
Justification = "This class has to work with both traditional and direct routing, which is the cause of the high" + | |
"number of classes it uses.")] | |
public class ControllerActionInvoker : IActionInvoker | |
{ | |
private static readonly ControllerDescriptorCache _staticDescriptorCache = new ControllerDescriptorCache(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class DefaultControllerActivator : IControllerActivator | |
{ | |
private Func<IDependencyResolver> _resolverThunk; | |
public DefaultControllerActivator() | |
: this(null) | |
{ | |
} | |
public DefaultControllerActivator(IDependencyResolver resolver) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Web.Mvc | |
{ | |
public class ControllerBuilder | |
{ | |
private static ControllerBuilder _instance = new ControllerBuilder(); | |
private Func<IControllerFactory> _factoryThunk = () => null; | |
private HashSet<string> _namespaces = new HashSet<string>(StringComparer.OrdinalIgnoreCase); | |
private IResolver<IControllerFactory> _serviceResolver; | |
public ControllerBuilder() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Web.Mvc | |
{ | |
public class ViewResult : ViewResultBase | |
{ | |
private string _masterName; | |
public string MasterName | |
{ | |
get { return _masterName ?? String.Empty; } | |
set { _masterName = value; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Web.Mvc | |
{ | |
[SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling", Justification = "Class complexity dictated by public surface area")] | |
public abstract class Controller : ControllerBase, IActionFilter, IAuthenticationFilter, IAuthorizationFilter, IDisposable, IExceptionFilter, IResultFilter, IAsyncController, IAsyncManagerContainer | |
{ | |
private static readonly object _executeTag = new object(); | |
private static readonly object _executeCoreTag = new object(); | |
private readonly AsyncManager _asyncManager = new AsyncManager(); | |
private IActionInvoker _actionInvoker; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Web.Mvc | |
{ | |
public abstract class ControllerBase : IController | |
{ | |
private readonly SingleEntryGate _executeWasCalledGate = new SingleEntryGate(); | |
private DynamicViewDataDictionary _dynamicViewDataDictionary; | |
private TempDataDictionary _tempDataDictionary; | |
private bool _validateRequest = true; | |
private IValueProvider _valueProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Web.Mvc | |
{ | |
public class DependencyResolver | |
{ | |
private static DependencyResolver _instance = new DependencyResolver(); | |
private IDependencyResolver _current; | |
/// <summary> | |
/// Cache should always be a new CacheDependencyResolver(_current). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class DefaultDependencyResolver : IDependencyResolver | |
{ | |
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "This method might throexceptions whose type we cannot strongly link against; namely, ActivationException from common service locator")] | |
public object GetService(Type serviceType) | |
{ | |
// Since attempting to create an instance of an interface or an abstract type results in an exception, immediatelreturn null | |
// to improve performance and the debugging experience with first-chance exceptions enabled. | |
if (serviceType.IsInterface || serviceType.IsAbstract) | |
{ | |
return null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Diagnostics.Contracts; | |
using System.Globalization; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; |
NewerOlder