[Fat-develop] FAT/src/FAT.Web IRequest.cs,NONE,1.1 Request.cs,NONE,1.1 TestFixtureHelpControl.cs,NON
Brought to you by:
exortech
|
From: <dmc...@us...> - 2004-03-06 13:55:11
|
Update of /cvsroot/fat/FAT/src/FAT.Web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23362/src/FAT.Web Modified Files: Default.aspx Default.aspx.cs FAT.Web.csproj IPage.cs Page.cs TestFixtureHelp.aspx TestFixtureHelp.aspx.cs Added Files: IRequest.cs Request.cs TestFixtureHelpControl.cs Log Message: Refactored TestFixtureHelpPageModel into TestFixtrureHelpControl. --- NEW FILE: IRequest.cs --- using System; namespace FAT.Web { public interface IRequest { object this[string key] {get;} } } --- NEW FILE: Request.cs --- using System; using System.Web; namespace FAT.Web { public class Request : IRequest { private HttpRequest request; public Request(HttpRequest request) { this.request = request; } public object this[string key] { get {return request[key];} } } } --- NEW FILE: TestFixtureHelpControl.cs --- using FAT.Core; using FAT.Core.Configuration; using System; using System.Web.UI; namespace FAT.Web { public class TestFixtureHelpControl : Control { private ITestFixtureLoader loader; private ITestFixtureHtmlFormatter formatter; private Control help; public TestFixtureHelpControl() : this(ConfigurationFactory.Create()) {} public TestFixtureHelpControl(IConfiguration configuration) : this(new TestFixtureLoader(configuration), configuration.TestFixtureHtmlFormatter) {} public TestFixtureHelpControl(ITestFixtureLoader loader, ITestFixtureHtmlFormatter formatter) { this.loader = loader; this.formatter = formatter; } protected override void CreateChildControls() { string fixture = (string)Page.Request["fixture"]; Type type = loader.GetType(fixture); help = formatter.Format(type, fixture); Controls.Add(help); } public Control Help { get { EnsureChildControls(); return help; } } protected new virtual IPage Page { get { return new Page(base.Page); }} } } Index: Default.aspx =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Web/Default.aspx,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Default.aspx 29 Feb 2004 14:59:52 -0000 1.6 --- Default.aspx 6 Mar 2004 13:40:17 -0000 1.7 *************** *** 1,4 **** - <%@ Register Tagprefix="FAT" Namespace="FAT.Web" Assembly="FAT.Web" %> <%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="FAT.Web.Default" EnableSessionState=true %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> --- 1,4 ---- <%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="FAT.Web.Default" EnableSessionState=true %> + <%@ Register Tagprefix="FAT" Namespace="FAT.Web" Assembly="FAT.Web" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> Index: Default.aspx.cs =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Web/Default.aspx.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Default.aspx.cs 29 Feb 2004 14:59:52 -0000 1.6 --- Default.aspx.cs 6 Mar 2004 13:40:17 -0000 1.7 *************** *** 25,28 **** --- 25,29 ---- protected PlaceHolder results; protected ImageButton fixtureHelpImageButton; + protected System.Web.UI.WebControls.HyperLink HyperLink1; private DefaultPageModel model = new DefaultPageModel(); *************** *** 54,57 **** --- 55,59 ---- { this.run.Click += new System.EventHandler(this.Run_Click); + } #endregion Index: FAT.Web.csproj =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Web/FAT.Web.csproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FAT.Web.csproj 29 Feb 2004 14:59:52 -0000 1.7 --- FAT.Web.csproj 6 Mar 2004 13:40:17 -0000 1.8 *************** *** 153,156 **** --- 153,161 ---- /> <File + RelPath = "IRequest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Page.cs" SubType = "Code" *************** *** 158,161 **** --- 163,171 ---- /> <File + RelPath = "Request.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "TestFixtureHelp.aspx" SubType = "Form" *************** *** 174,178 **** /> <File ! RelPath = "TestFixtureHelpPageModel.cs" SubType = "Code" BuildAction = "Compile" --- 184,188 ---- /> <File ! RelPath = "TestFixtureHelpControl.cs" SubType = "Code" BuildAction = "Compile" *************** *** 236,244 **** /> <File - RelPath = "HtmlDetails\IRequest.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "HtmlDetails\IResponse.cs" SubType = "Code" --- 246,249 ---- *************** *** 256,264 **** /> <File - RelPath = "HtmlDetails\Request.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "HtmlDetails\Response.cs" SubType = "Code" --- 261,264 ---- Index: IPage.cs =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Web/IPage.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IPage.cs 29 Feb 2004 14:59:52 -0000 1.1 --- IPage.cs 6 Mar 2004 13:40:17 -0000 1.2 *************** *** 6,9 **** --- 6,10 ---- { bool IsPostBack {get;} + IRequest Request {get;} } } Index: Page.cs =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Web/Page.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Page.cs 29 Feb 2004 14:59:52 -0000 1.1 --- Page.cs 6 Mar 2004 13:40:17 -0000 1.2 *************** *** 12,15 **** --- 12,16 ---- public bool IsPostBack {get {return page.IsPostBack;}} + public IRequest Request {get {return new Request(page.Request); }} } } Index: TestFixtureHelp.aspx =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Web/TestFixtureHelp.aspx,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestFixtureHelp.aspx 20 Feb 2004 17:56:50 -0000 1.1 --- TestFixtureHelp.aspx 6 Mar 2004 13:40:17 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- <%@ Page language="c#" Codebehind="TestFixtureHelp.aspx.cs" AutoEventWireup="false" Inherits="FAT.Web.TestFixtureHelp" %> + <%@ Register Tagprefix="FAT" Namespace="FAT.Web" Assembly="FAT.Web" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> *************** *** 7,11 **** </HEAD> <body> ! <asp:PlaceHolder id="fixtureHelp" runat="server"></asp:PlaceHolder> </body> </HTML> --- 8,12 ---- </HEAD> <body> ! <FAT:TestFixtureHelpControl runat="server"></FAT:TestFixtureHelpControl> </body> </HTML> Index: TestFixtureHelp.aspx.cs =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Web/TestFixtureHelp.aspx.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestFixtureHelp.aspx.cs 29 Feb 2004 14:59:52 -0000 1.2 --- TestFixtureHelp.aspx.cs 6 Mar 2004 13:40:17 -0000 1.3 *************** *** 7,19 **** public class TestFixtureHelp : System.Web.UI.Page { - protected System.Web.UI.WebControls.Literal help; - protected PlaceHolder fixtureHelp; - - private void Page_Load(object sender, EventArgs e) - { - TestFixtureHelpPageModel model = new TestFixtureHelpPageModel(); - fixtureHelp.Controls.Add(model.CreateFixtureHelp(Request["fixture"])); - } - #region Web Form Designer generated code override protected void OnInit(EventArgs e) --- 7,10 ---- *************** *** 32,37 **** private void InitializeComponent() { - this.Load += new System.EventHandler(this.Page_Load); - } #endregion --- 23,26 ---- |