Table of Contents

Class ControllerBuilder

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Represents a class that is responsible for dynamically building a controller.

public class ControllerBuilder
Inheritance
ControllerBuilder
Inherited Members

Constructors

ControllerBuilder()

Initializes a new instance of the ControllerBuilder class.

public ControllerBuilder()

Properties

Current

Gets the current controller builder object.

public static ControllerBuilder Current { get; }

Property Value

ControllerBuilder

The current controller builder.

DefaultNamespaces

Gets the default namespaces.

public HashSet<string> DefaultNamespaces { get; }

Property Value

HashSet<string>

The default namespaces.

Methods

GetControllerFactory()

Gets the associated controller factory.

public IControllerFactory GetControllerFactory()

Returns

IControllerFactory

The controller factory.

SetControllerFactory(Type)

Sets the controller factory by using the specified type.

public void SetControllerFactory(Type controllerFactoryType)

Parameters

controllerFactoryType Type

The type of the controller factory.

Exceptions

ArgumentNullException

The controllerFactoryType parameter is null.

ArgumentException

The controller factory cannot be assigned from the type in the controllerFactoryType parameter.

InvalidOperationException

An error occurred while the controller factory was being set.

SetControllerFactory(IControllerFactory)

Sets the specified controller factory.

public void SetControllerFactory(IControllerFactory controllerFactory)

Parameters

controllerFactory IControllerFactory

The controller factory.

Exceptions

ArgumentNullException

The controllerFactory parameter is null.