/// <summary>
 /// Creates a controller and its view
 /// </summary>
 public IController Create( ControllerInitializationContext initContext )
 {
     IController controller = m_Create( initContext );
     controller.Factory = this;
     controller.Initialize( initContext );
     return controller;
 }
 /// <summary>
 /// Initializes this controller
 /// </summary>
 /// <param name="context">Initialization context</param>
 public void Initialize( ControllerInitializationContext context )
 {
     ValidateInitializationContext( context );
     if ( m_Factory == null )
     {
         throw new InvalidOperationException( "Factory must be set prior to initialization" );
     }
     m_InitContext = context;
     PostInitialize( context );
 }
 /// <summary>
 /// Validates the initialization context passed to Initialize()
 /// </summary>
 protected virtual void ValidateInitializationContext( ControllerInitializationContext context )
 {
     Arguments.CheckNotNull( context, "context" );
 }
 /// <summary>
 /// Post initialization - provides customatization of initialization to derived classes
 /// </summary>
 protected virtual void PostInitialize( ControllerInitializationContext initContext )
 {
 }