// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002, 2003 Ximian, Inc. (http://www.ximian.com)
-//
-
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.Collections;
using System.CodeDom;
using System.Reflection;
-using System.Web;
+using System.Security.Permissions;
using System.Web.Compilation;
namespace System.Web.UI {
+ // CAS
+ [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class ControlBuilder
{
internal static BindingFlags flagsNoCase = BindingFlags.Public |
internal bool haveParserVariable;
internal CodeMemberMethod method;
+ internal CodeStatementCollection methodStatements;
internal CodeMemberMethod renderMethod;
internal int renderIndex;
internal bool isProperty;
}
#if NET_2_0
- public
+ public virtual
#else
internal
#endif
builder = new CollectionBuilder ();
} else if (typeof (ITemplate).IsAssignableFrom (propType)) {
builder = new TemplateBuilder (prop);
+ } else if (typeof (string) == propType) {
+ builder = new StringPropertyBuilder (prop.Name);
} else {
builder = CreateBuilderFromType (parser, parentBuilder, propType, prop.Name,
null, atts, line, fileName);
}
}
}
+#if NET_2_0
+ [MonoTODO ("unsure, lack documentation")]
+ public virtual object BuildObject ()
+ {
+ return CreateInstance ();
+ }
+
+ internal void ResetState()
+ {
+ renderIndex = 0;
+ haveParserVariable = false;
+
+ if (Children != null) {
+ foreach (object child in Children) {
+ ControlBuilder cb = child as ControlBuilder;
+ if (cb != null)
+ cb.ResetState ();
+ }
+ }
+ }
+#endif
}
}
-