Files
mono/mcs/class/System.Web/System.Web.UI/TemplateControl.cs
T
Gonzalo Paniagua Javier 922dfc4b3d 2002-08-16 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/AspElements.cs:
	* System.Web.Compilation/AspParser.cs:
	* System.Web.Compilation/AspTokenizer.cs:
	* System.Web.Compilation/ChangeLog:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/TemplateFactory.cs:
	* System.Web.UI/ApplicationFileParser.cs:
	* System.Web.UI/BaseParser.cs:
	* System.Web.UI/PageParser.cs:
	* System.Web.UI/TemplateControl.cs:
	* System.Web.UI/TemplateControlParser.cs:
	* System.Web.UI/TemplateParser.cs: first steps to move xsp into
	System.Web.

svn path=/trunk/mcs/; revision=6668
2002-08-16 05:36:06 +00:00

157 lines
2.6 KiB
C#
Executable File

//
// System.Web.UI.TemplateControl.cs
//
// Duncan Mak ([email protected])
//
// (C) Ximian, Inc.
//
using System;
namespace System.Web.UI {
public abstract class TemplateControl : Control, INamingContainer
{
private object abortTransaction = new object ();
private object commitTransaction = new object ();
private object error = new object ();
#region Constructor
protected TemplateControl ()
{
Construct ();
}
#endregion
#region Properties
protected virtual int AutoHandlers
{
get { return 0; }
set { }
}
protected virtual bool SupportAutoEvents
{
get { return true; }
}
#endregion
#region Methods
protected virtual void Construct ()
{
}
[MonoTODO]
protected virtual LiteralControl CreateResourceBasedLiteralControl (int offset,
int size,
bool fAsciiOnly)
{
return null;
}
protected virtual void FrameworkInitialize ()
{
}
[MonoTODO]
public Control LoadControl (string virtualPath)
{
return null;
}
[MonoTODO]
public ITemplate LoadTemplate (string virtualPath)
{
return null;
}
protected virtual void OnAbortTransaction (EventArgs e)
{
EventHandler eh = (EventHandler) Events [error];
if (eh != null)
eh.Invoke (this, e);
}
protected virtual void OnCommitTransaction (EventArgs e)
{
EventHandler eh = (EventHandler) Events [commitTransaction];
if (eh != null)
eh.Invoke (this, e);
}
protected virtual void OnError (EventArgs e)
{
EventHandler eh = (EventHandler) Events [abortTransaction];
if (eh != null)
eh.Invoke (this, e);
}
[MonoTODO]
public Control ParseControl (string content)
{
return null;
}
[MonoTODO]
public static object ReadStringResource (Type t)
{
return null;
}
[MonoTODO]
protected void SetStringResourcePointer (object stringResourcePointer,
int maxResourceOffset)
{
}
[MonoTODO]
protected void WriteUTF8ResourceString (HtmlTextWriter output, int offset,
int size, bool fAsciiOnly)
{
}
#endregion
#region Events
public event EventHandler AbortTransaction
{
add {
Events.AddHandler (abortTransaction, value);
}
remove {
Events.RemoveHandler (abortTransaction, value);
}
}
public event EventHandler CommitTransaction
{
add {
Events.AddHandler (commitTransaction, value);
}
remove {
Events.RemoveHandler (commitTransaction, value);
}
}
public event EventHandler Error
{
add {
Events.AddHandler (error, value);
}
remove {
Events.RemoveHandler (error, value);
}
}
#endregion
}
}