/*********************************************************** * * 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; namespace PixelDragons.MVC { public class Command { private string _commandText; private string _controllerName; private string _actionName; private string _originalControllerName; private string _originalActionName; private View _view = null; public Command(string commandText, string controllerName, string actionName) { _commandText = commandText; _originalControllerName = controllerName; _originalActionName = actionName; if (_originalActionName == null) { _originalActionName = "default"; } _controllerName = CapitalizeString(controllerName); _actionName = CapitalizeString(actionName); } public string ControllerName { get { return _controllerName; } } public string ActionName { get { return _actionName; } } public string CommandText { get { return _commandText; } } public string OriginalControllerName { get { return _originalControllerName; } } public string OriginalActionName { get { return _originalActionName; } } private string CapitalizeString(string text) { if (text != null) { string c = text.Substring(0, 1); c = c.ToUpper(); text = c + text.Substring(1); } return text; } public View View { get { return _view; } set { _view = value; } } } }
By viewing downloads associated with this article you agree to the Terms of use 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.
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
Math Primers for Programmers