controller.cs

来自「这个是网上相册系统的一个架构设计说明」· CS 代码 · 共 55 行

CS
55
字号
using System;
using System.Collections;
using Model;

namespace Controller
{
	/// <summary>
	/// Controller 的摘要说明。
	/// </summary>
	public class Controller : IController
	{
		static IController CreateHandler(string viewName)
		{
			switch(viewName.ToUpper())
			{
				case "LOGIN":
					//return new 
					break;
			}
			return null;
		}

		public Controller()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}
		#region IController 成员

		public IModel Execute(IDictionary colParam)
		{
			if(_next != null)
				return _next.Execute(colParam);
			return null;
		}

		public IController Next()
		{
			// TODO:  添加 Controller.Next 实现
			return _next;
		}

		#endregion

		protected void SetNext(IController next)
		{
			_next = next;
		}

		protected IController _next = null;

	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?