Click here to Skip to main content
15,886,797 members
Articles / Web Development / ASP.NET

PixelDragonsMVC.NET - An open source MVC framework

Rate me:
Please Sign up or sign in to vote.
4.58/5 (8 votes)
29 Jun 200710 min read 85.1K   811   73  
An MVC framework with built-in NHibernate support that makes creating ASP.NET 2 applications easier by minimizing code and configuration
/***********************************************************
 * 
 * Copyright 2007 Pixel Dragons Ltd. All rights reserved.
 * 
 * http://www.codeplex.com/PixelDragonsMVC for licence, more
 * information and latest source code. 
 * 
 * Check out our other stuff at http://www.pixeldragons.com
 * 
 ***********************************************************/

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.SessionState;

using PixelDragons.MVC.Interfaces;
using PixelDragons.MVC.Persistence;

using log4net;

namespace PixelDragons.MVC.Controllers
{
    public class Controller : IController
    {
        private HttpContext _context;
        private HttpRequest _request;
        private HttpServerUtility _server;
        private HttpResponse _response;
        private HttpSessionState _session;
        private SessionManager _sessionManager;
        private TransactionManager _transactionManager;
        private PersistenceManager _persistenceManager;
        private ILog _logger;
        private string _viewName;
        private object _model;
        private string _ajaxViewPart;
        private Command _command;

        public Controller()
        { 
        
        }

        public HttpContext Context
        {
            get { return _context; }
            set { _context = value; }
        }

        public HttpRequest Request
        {
            get { return _request; }
            set { _request = value; }
        }

        public HttpServerUtility Server
        {
            get { return _server; }
            set { _server = value; }
        }

        public HttpResponse Response
        {
            get { return _response; }
            set { _response = value; }
        }

        public HttpSessionState Session
        {
            get { return _session; }
            set { _session = value; }
        }

        public ILog Logger
        {
            get { return _logger; }
            set { _logger = value; }
        }

        public string ViewName
        {
            get { return _viewName; }
            set { _viewName = value; }
        }

        public object Model
        {
            get { return _model; }
            set { _model = value; }
        }

        public string AjaxViewPart
        {
            get { return _ajaxViewPart; }
            set { _ajaxViewPart = value; }
        }

        public SessionManager SessionManager
        {
            get { return _sessionManager; }
            set { _sessionManager = value; }
        }

        public TransactionManager TransactionManager
        {
            get { return _transactionManager; }
            set { _transactionManager = value; }
        }

        public PersistenceManager PersistenceManager
        {
            get { return _persistenceManager; }
            set { _persistenceManager = value; }
        }

        public Command Command
        {
            get { return _command; }
            set { _command = value; }
        }

        public virtual void BeforeAction()
        {
        }

        public virtual void DefaultAction()
        {
        }

        public virtual void AfterAction()
        {
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions