Files
mono/mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs
T
Jackson Harper ad6fd34680 * TemplateParser.cs: Add VaryByControls and Shared output cache
properties. These are not assigned yet.
	* TemplateControlParser.cs: Do not ignore the OutputCache
	attribute.
	* BasePartialCachingControl.cs: Initial implementation. Keys are
	still not created properly.
	* StaticPartialCachingControl.cs: Assign properties in base class,
	implement CreateControl.

svn path=/trunk/mcs/; revision=22033
2004-01-13 21:21:27 +00:00

52 lines
1.2 KiB
C#

//
// System.Web.UI.StaticPartialCachingControl.cs
//
// Author:
// Andreas Nahr ([email protected])
//
// (C) 2003 Andreas Nahr
//
using System;
using System.ComponentModel;
namespace System.Web.UI
{
public class StaticPartialCachingControl : BasePartialCachingControl
{
private BuildMethod buildMethod;
public StaticPartialCachingControl (string ctrlID, string guid, int duration,
string varyByParams, string varyByControls, string varyByCustom,
BuildMethod buildMethod)
{
CtrlID = ctrlID;
Guid = guid;
Duration = duration;
VaryByParams = varyByParams;
VaryByControls = varyByControls;
VaryByCustom = varyByCustom;
this.buildMethod = buildMethod;
}
public static void BuildCachedControl (Control parent, string ctrlID, string guid,
int duration, string varyByParams, string varyByControls,
string varyByCustom, BuildMethod buildMethod)
{
StaticPartialCachingControl NewControl =
new StaticPartialCachingControl (ctrlID, guid, duration,
varyByParams, varyByControls, varyByCustom,
buildMethod);
parent.Controls.Add (NewControl);
}
internal override Control CreateControl()
{
return buildMethod ();
}
}
}