// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
-//
-
+// Copyright (C) 2004-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
using System.IO;
using System.ComponentModel;
using System.Data.Common;
+using System.Drawing;
using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
[AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[DesignerAttribute ("System.Web.UI.Design.WebControls.AccessDataSourceDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
- public class AccessDataSource : SqlDataSource
- {
+ [ToolboxBitmap ("")]
+ public class AccessDataSource : SqlDataSource {
+
string dataFile;
public AccessDataSource () : base ()
// Author:
// Ben Maurer <bmaurer@novell.com>
//
-// (c) 2005 Novell
+// 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
using System.Xml;
using System.Collections;
using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[DefaultEvent("AdCreated")]
[DefaultProperty("AdvertisementFile")]
[Designer("System.Web.UI.Design.WebControls.AdRotatorDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
throw new NotImplementedException ();
}
}
-
- /* listed in corcompare */
- [MonoTODO]
- public override Page Page
- {
- get {
- return base.Page;
- }
- set {
- base.Page = value;
- }
- }
#endif
[Bindable(true)]
return base.TagKey;
}
}
-
- [MonoTODO]
- protected override StateBag ViewState
- {
- get {
- return base.ViewState;
- }
- }
#endif
protected virtual void OnAdCreated (AdCreatedEventArgs e)
using System.Drawing;
using System.ComponentModel;
using System.ComponentModel.Design;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[DesignerAttribute ("System.Web.UI.Design.WebControls.BulletedListDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
[DefaultEventAttribute ("Click")]
[DefaultPropertyAttribute ("BulletStyle")]
+ [SupportsEventValidation]
public class BulletedList : ListControl, IPostBackEventHandler {
[MonoTODO ("we are missing a new style enum, we should be using it")]
using System.ComponentModel;
using System.ComponentModel.Design;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[DefaultEvent ("Click")]
[DataBindingHandler ("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
[DefaultProperty ("Text")]
#if NET_2_0
[ToolboxDataAttribute ("<{0}:Button runat=\"server\" Text=\"Button\"></{0}:Button>")]
+ [SupportsEventValidation]
#else
[ToolboxDataAttribute ("<{0}:Button runat=server Text=\"Button\"></{0}:Button>")]
#endif
using System.Collections;
using System.ComponentModel;
using System.Drawing;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[DataBindingHandler("System.Web.UI.Design.WebControls.CalendarDataBindingHandler, " + Consts.AssemblySystem_Design)]
[DefaultEvent("SelectionChanged")]
[DefaultProperty("SelectedDate")]
[Designer("System.Web.UI.Design.WebControls.CalendarDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
#if NET_2_0
[ControlValueProperty ("SelectedDate", "1/1/0001 12:00:00 AM")]
+ [SupportsEventValidation]
#endif
public class Calendar : WebControl, IPostBackEventHandler {
+2005-09-20 Sebastien Pouliot <sebastien@ximian.com>
+
+ * AccessDataSource.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added [ToolboxBitmap] on class.
+ * AdRotator.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Removed extra Page and ViewState properties.
+ * BulletedList.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * Button.cs: Added declarative security (Link and Inheritance demands)
+ for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * Calendar.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * CheckBox.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * CompositeControl.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added new protected RecreateChildControls method.
+ * DataControlCommands.cs: Added declarative security (LinkDemands) for
+ Minimal. Added private ctor.
+ * DataGrid.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Fixed properties for 2.0 (mostly removing
+ [Bindable]). Added override for TagKey property.
+ * DataGridColumn.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added [UrlProperty] on HeaderImageUrl (2.0).
+ * DataGridItem.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added IDataItemContainer interface for 2.0.
+ * DataGridPagerStyle.cs: Added declarative security (LinkDemands) for
+ Minimal. Remove [Bindable] from 2.0 and add [Localizable].
+ * DataList.cs: Removed [Load|Save]ControlState methods.
+ * DropDownList.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * EditCommandColumn.cs: Added declarative security (Link and
+ Inheritance demands) for Minimal. Added missing attributes,
+ [DefaultValue] and [Localize] for 2.0.
+ * FontInfo.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Remove [Bindable] and added [RefreshProperties]
+ for 2.0.
+ * Login.cs: Added declarative security (Link and Inheritance demands)
+ for Minimal. Fixed IsStyleEmpty. Removed extra [Themeable] attributes.
+ * ImageButton.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * LinkButton.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * ListBox.cs: Added declarative security (Link and Inheritance demands)
+ for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * Literal.cs: Added declarative security (Link and Inheritance demands)
+ for Minimal. Removed [EditorBrowsable] on CreateControlCollection method.
+ * LoginStatus.cs: Added missing [Themeable] attributes on properties.
+ * MenuItemStyle.cs: Changed IsEmpty to public (required to compile -
+ but will be shown as extra).
+ * RadioButton.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * RadioButtonList.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * RangeValidator.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Added missing [Themeable] attributes.
+ * RegularExpressionValidator.cs: Added declarative security (Link and
+ Inheritance demands) for Minimal. Remove [Bindable] from 2.0 and add
+ [Localizable].
+ * RoleGroupCollection.cs: Added declarative security (Link and
+ Inheritance demands) for Minimal. Fixed base class (changed in RC).
+ Re-implemented CopyTo. Removed some methods.
+ * Style.cs: Added declarative security (Link and Inheritance demands)
+ for Minimal. Remove static IsStyleEmpty and ToString (from 2.0). IsEmpty
+ is now public in 2.0.
+ * Table.cs: Added declarative security (Link and Inheritance demands)
+ for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * TableCell.cs: Fixed PersistenceMode for 2.0.
+ * TextBox.cs: Added declarative security (Link and Inheritance demands)
+ for Minimal. Added [SupportsEventValidation] on class (2.0).
+ * TreeNodeStyle.cs: Changed IsEmpty to public (required to compile -
+ but will be shown as extra).
+ * WebControl.cs: Added declarative security (Link and Inheritance
+ demands) for Minimal. Removed [EditorBrowsable] on ControlStyleCreated
+ property.
+
2005-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* TableStyle.cs: fixed typo that prevented restoring GridLines from
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System.Web.UI;
using System.Collections.Specialized;
using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[Designer ("System.Web.UI.Design.WebControls.CheckBoxDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
[DataBindingHandler ("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
[DefaultEvent ("CheckedChanged")]
[DefaultProperty ("Text")]
#if NET_2_0
[ControlValueProperty ("Checked", null)]
+ [SupportsEventValidation]
#endif
public class CheckBox : WebControl, IPostBackDataHandler
#if NET_2_0
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if NET_2_0
+
using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
-#if NET_2_0
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[Designer ("System.Web.UI.Design.WebControls.CompositeControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
public abstract class CompositeControl : WebControl, INamingContainer, ICompositeControlDesignerAccessor {
* the recreation of our children. */
CreateChildControls ();
}
+
+ [MonoTODO("not sure exactly what this one does..")]
+ protected virtual void RecreateChildControls ()
+ {
+ /* for now just call CreateChildControls to force
+ * the recreation of our children. */
+ CreateChildControls ();
+ }
public override ControlCollection Controls {
get {
}
}
}
-#endif
-
}
+
+#endif
//
#if NET_2_0
-using System.Web.UI;
+using System.Security.Permissions;
-namespace System.Web.UI.WebControls
-{
+namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class DataControlCommands
{
public const string CancelCommandName = "Cancel";\r
public const string PreviousPageCommandArgument = "Prev";\r
public const string SelectCommandName = "Select";\r
public const string SortCommandName = "Sort";\r
- public const string UpdateCommandName = "Update";\r
+ public const string UpdateCommandName = "Update";
+
+ private DataControlCommands ()
+ {
+ }\r
}
}
#endif
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.Web.Util;
using System.Collections;
using System.Globalization;
using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[Editor("System.Web.UI.Design.WebControls.DataGridComponentEditor, " + Consts.AssemblySystem_Design, typeof(System.ComponentModel.ComponentEditor))]
[Designer("System.Web.UI.Design.WebControls.DataGridDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
public class DataGrid : BaseDataList, INamingContainer {
set { ViewState ["AutoGenerateColumns"] = value; }
}
+#if NET_2_0
+ [UrlProperty]
+#else
[Bindable(true)]
+#endif
[DefaultValue("")]
[Editor("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, typeof(System.Drawing.Design.UITypeEditor))]
[WebSysDescription ("")]
set { TableStyle.BackImageUrl = value; }
}
-
+#if ONLY_1_1
[Bindable(true)]
+#endif
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[WebSysDescription ("")]
}
}
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(false)]
[WebSysDescription ("")]
[WebCategory ("Appearance")]
set { ViewState ["ShowFooter"] = value; }
}
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(true)]
[WebSysDescription ("")]
[WebCategory ("Appearance")]
}
}
+#if NET_2_0
+ [MonoTODO ("why override ?")]
+ protected override HtmlTextWriterTag TagKey {
+ get { return base.TagKey; }
+ }
+#endif
+
private TableStyle TableStyle {
get { return (TableStyle) ControlStyle; }
}
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System.Web.UI;
using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[TypeConverter (typeof (System.ComponentModel.ExpandableObjectConverter))]
public abstract class DataGridColumn : IStateManager
{
[DefaultValue ("")]
[WebSysDescription ("")]
[WebCategory ("Misc")]
+#if NET_2_0
+ [UrlProperty]
+#endif
public virtual string HeaderImageUrl
{
get {
//
using System.ComponentModel;
-using System.Web.UI;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+#if NET_2_0
+ public class DataGridItem : TableRow, INamingContainer, IDataItemContainer {
+#else
public class DataGridItem : TableRow, INamingContainer {
+#endif
#region Fields
private object item;
private int dataset_index;
}
#endregion // Public Instance Properties
+#if NET_2_0
+ #region IDataItemContainer Properties
+ object IDataItemContainer.DataItem {
+ get { return item; }
+ }
+
+ int IDataItemContainer.DataItemIndex{
+ get { return item_index; }
+ }
+
+ int IDataItemContainer.DisplayIndex{
+ get { return item_index; }
+ }
+ #endregion // IDataItemContainer Properties
+#endif
+
#region Public Instance Methods
protected override bool OnBubbleEvent(object source, EventArgs args) {
// Nikhil Kothari, pg 312-313:
//
using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS - no inheritance demand required because the class is sealed
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class DataGridPagerStyle : TableItemStyle {
#region Constructors
internal DataGridPagerStyle () {
#endregion // Constructors
#region Public Instance Properties
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(PagerMode.NextPrev)]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
}
}
+#if NET_2_0
+ [Localizable (true)]
+#else
[Bindable(true)]
+#endif
[DefaultValue(">")]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
}
}
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(10)]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
}
}
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(PagerPosition.Bottom)]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
}
}
+#if NET_2_0
+ [Localizable (true)]
+#else
[Bindable(true)]
+#endif
[DefaultValue("<")]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
}
}
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(true)]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
if (state [7] != null)
FooterStyle.LoadViewState (state [7]);
}
-#if NET_2_0
- protected internal override void LoadControlState (object savedState)
- {
- // FIXME: what's in Triplet.First ?
- // ??? maybe a some space for base.LoadControlState ???
- if (savedState == null) {
- // reset to default values
- editIndex = -1;
- selectedIndex = -1;
- } else {
- Triplet t = (Triplet) savedState;
- if (t.Second == null) {
- editIndex = -1;
- } else {
- editIndex = (int) t.Second;
- }
- if (t.Third == null) {
- selectedIndex = -1;
- } else {
- selectedIndex = (int) t.Third;
- }
- }
- }
- protected internal override object SaveControlState ()
- {
- bool e = (editIndex == -1);
- bool s = (selectedIndex == -1);
- if (e && s)
- return null;
-
- Triplet t = new Triplet ();
- if (!e)
- t.Second = editIndex;
- if (!s)
- t.Third = selectedIndex;
-
- return (object) t;
- }
-#endif
protected override bool OnBubbleEvent (object source, EventArgs e)
{
DataListCommandEventArgs dlca = (e as DataListCommandEventArgs);
//
//
-using System;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Drawing;
-using System.Web;
-using System.Web.UI;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[ValidationProperty("SelectedItem")]
+#if NET_2_0
+ [SupportsEventValidation]
+#endif
public class DropDownList : ListControl, IPostBackDataHandler {
#region Public Constructors
public DropDownList() {
//
//
-using System;
-using System.Web.UI;
+using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class EditCommandColumn : DataGridColumn {
#region Public Constructors
public EditCommandColumn() {
}
}
+#if NET_2_0
+ [DefaultValue ("")]
+ [Localizable (true)]
+#endif
public virtual string CancelText {
get {
return ViewState.GetString("CancelText", string.Empty);
}
}
+#if NET_2_0
+ [DefaultValue ("")]
+ [Localizable (true)]
+#endif
public virtual string EditText {
get {
return ViewState.GetString("EditText", string.Empty);
}
}
+#if NET_2_0
+ [DefaultValue ("")]
+ [Localizable (true)]
+#endif
public virtual string UpdateText {
get {
return ViewState.GetString("UpdateText", string.Empty);
//
using System.ComponentModel;
+using System.Security.Permissions;
-namespace System.Web.UI.WebControls
-{
+namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public sealed class FontInfo
{
[Flags]
- internal enum FontStyles
+ internal enum FontStyles
{
None = 0,
Bold = 0x0001,
#endregion // Constructors
#region Public Instance Properties
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(false)]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
}
}
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(false)]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
}
}
+#if NET_2_0
+ [RefreshProperties (RefreshProperties.Repaint)]
+#else
[Bindable(true)]
+#endif
[DefaultValue("")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Editor("System.Drawing.Design.FontNameEditor, " + Consts.AssemblySystem_Drawing_Design, typeof(System.Drawing.Design.UITypeEditor))]
}
}
+#if NET_2_0
+ [RefreshProperties (RefreshProperties.Repaint)]
+#endif
[Editor("System.Windows.Forms.Design.StringArrayEditor, " + Consts.AssemblySystem_Design, typeof (System.Drawing.Design.UITypeEditor))]
[NotifyParentProperty(true)]
[TypeConverter(typeof(System.Web.UI.WebControls.FontNamesConverter))]
}
}
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(false)]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
}
}
+#if NET_2_0
+ [RefreshProperties (RefreshProperties.Repaint)]
+#else
[Bindable(true)]
+#endif
[DefaultValue(typeof (FontUnit), "")]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
}
}
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(false)]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
}
}
+#if ONLY_1_1
[Bindable(true)]
+#endif
[DefaultValue(false)]
[NotifyParentProperty(true)]
[WebSysDescription ("")]
using System.Collections.Specialized;
using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[DefaultEvent("Click")]
#if NET_2_0
[Designer ("System.Web.UI.Design.WebControls.PreviewControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
-#endif
- public class ImageButton : Image, IPostBackDataHandler, IPostBackEventHandler
-#if NET_2_0
- , IButtonControl
-#endif
- {
-
+ [SupportsEventValidation]
+ public class ImageButton : Image, IPostBackDataHandler, IPostBackEventHandler, IButtonControl {
+#else
+ public class ImageButton : Image, IPostBackDataHandler, IPostBackEventHandler {
+#endif
private static readonly object ClickEvent = new object ();
private static readonly object CommandEvent = new object ();
private int pos_x, pos_y;
//
using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[ControlBuilder(typeof(LinkButtonControlBuilder))]
[DataBindingHandler("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
[DefaultEvent("Click")]
[Designer("System.Web.UI.Design.WebControls.LinkButtonDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
[ParseChildren(false)]
#if NET_2_0
+ [SupportsEventValidation]
[ToolboxData("<{0}:LinkButton runat=\"server\">LinkButton</{0}:LinkButton>")]
#else
[ToolboxData("<{0}:LinkButton runat=server>LinkButton</{0}:LinkButton>")]
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using System.Collections.Specialized;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[ValidationProperty("SelectedItem")]
+#if NET_2_0
+ [SupportsEventValidation]
+#endif
public class ListBox : ListControl, IPostBackDataHandler {
public ListBox ()
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.ComponentModel;
-using System.Web.UI;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[ControlBuilder(typeof(LiteralControlBuilder))]
[DataBindingHandler("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
[DefaultProperty("Text")]
}
#endif
-#if NET_2_0
- [EditorBrowsable (EditorBrowsableState.Never)]
-#endif
protected override ControlCollection CreateControlCollection ()
{
return new EmptyControlCollection (this);
[DefaultValue ("")]
[Editor ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
- [Themeable (false)]
[UrlProperty]
public virtual string CreateUserUrl {
get {
private bool IsEmpty (Style style)
{
- return System.Web.UI.WebControls.Style.IsStyleEmpty (style);
+ if (style == null)
+ return true;
+ return style.IsEmpty;
}
private bool IsDefaultLoginPage ()
}
[DefaultValue (LogoutAction.Refresh)]
+ [Themeable (false)]
public virtual LogoutAction LogoutAction {
get {
object o = ViewState ["LogoutAction"];
[DefaultValue ("")]
[Editor ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
+ [Themeable (false)]
[UrlProperty]
public virtual string LogoutPageUrl {
get {
}
}
- protected internal override bool IsEmpty {
+ // FIXME: shouldn't be part of the public API
+ public override bool IsEmpty {
get {
return base.IsEmpty &&
!IsSet(HORZ_PADD) &&
using System.Collections.Specialized;
using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[Designer ("System.Web.UI.Design.WebControls.CheckBoxDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
+#if NET_2_0
+ [SupportsEventValidation]
+#endif
public class RadioButton : CheckBox , IPostBackDataHandler
{
public RadioButton () : base ("radio")
using System.Collections;
using System.ComponentModel;
using System.Collections.Specialized;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[ValidationProperty ("SelectedItem")]
+#if NET_2_0
+ [SupportsEventValidation]
+#endif
public class RadioButtonList : ListControl, IRepeatInfoUser,
INamingContainer, IPostBackDataHandler {
bool need_raise;
//
//
-using System;
using System.ComponentModel;
using System.Globalization;
+using System.Security.Permissions;
// Modeled after Nikhil Kothari's sample in "ASP Server Controls and Components", pp368
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
#if NET_2_0
[ToolboxData("<{0}:RangeValidator runat=\"server\" ErrorMessage=\"RangeValidator\"></{0}:RangeValidator>")]
#else
#endregion // Public Constructors
#region Public Instance Properties
+#if NET_2_0
+ [Themeable (false)]
+#else
[Bindable(true)]
+#endif
[DefaultValue("")]
[WebSysDescription ("")]
[WebCategory ("Behavior")]
}
}
+#if NET_2_0
+ [Themeable (false)]
+#else
[Bindable(true)]
+#endif
[DefaultValue("")]
[WebSysDescription ("")]
[WebCategory ("Behavior")]
using System.Web;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
#if NET_2_0
[ToolboxData ("<{0}:RegularExpressionValidator runat=\"server\" ErrorMessage=\"RegularExpressionValidator\"></{0}:RegularExpressionValidator>")]
#else
return Regex.IsMatch (GetControlValidationValue(ControlToValidate), ValidationExpression);
}
+#if NET_2_0
+ [Themeable (false)]
+#else
[Bindable(true)]
+#endif
[DefaultValue ("")]
[Editor ("System.Web.UI.Design.WebControls.RegexTypeEditor, " + Consts.AssemblySystem_Design, typeof(System.Drawing.Design.UITypeEditor))]
[WebSysDescription ("")]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
[Editor ("System.Web.UI.Design.WebControls.RoleGroupCollectionEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
- public sealed class RoleGroupCollection : StateManagedCollection {
+ public sealed class RoleGroupCollection : CollectionBase {
public RoleGroupCollection ()
{
public void CopyTo (RoleGroup[] array, int index)
{
- base.CopyTo (array, index);
- }
-
- protected override object CreateKnownType (int index)
- {
- return new RoleGroup ();
+ if (array == null)
+ throw new ArgumentNullException ("array");
+ if (index < 0)
+ throw new ArgumentException (Locale.GetText ("Negative index."), "index");
+ if (this.Count <= array.Length - index)
+ throw new ArgumentException (Locale.GetText ("Destination isn't large enough to copy collection."), "array");
+
+ for (int i=0; i < Count; i++)
+ array [i + index] = this [i];
}
public RoleGroup GetMatchingRoleGroup (IPrincipal user)
public void OnValidate (object sender)
{
}
-
- [MonoTODO]
- protected override void SetDirtyObject (object o)
- {
- }
}
}
//
//
-using System;
using System.ComponentModel;
using System.Drawing;
+using System.Security.Permissions;
-namespace System.Web.UI.WebControls
-{
+namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
#if NET_2_0
// Not until we actually have StyleConverter
// [TypeConverter(typeof(System.Web.UI.WebControls.StyleConverter))]
#endregion // Public Instance Properties
#region Protected Instance Properties
+#if NET_2_0
+ [Browsable (false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public virtual bool IsEmpty
+#else
protected internal virtual bool IsEmpty
+#endif
{
get
{
}
styles = Styles.None;
}
-
+#if ONLY_1_1
public override string ToString()
{
return string.Empty;
}
+#endif
#endregion // Public Instance Methods
#region Protected Instance Methods
if (viewstate != null)
viewstate.SetDirty (true);
}
-
- public static bool IsStyleEmpty (Style s)
- {
- if (s == null)
- return true;
- return s.IsEmpty;
- }
-
#endif
}
}
[Designer ("System.Web.UI.Design.WebControls.TableDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
[ParseChildren (true, "Rows")]
#if NET_2_0
+ [SupportsEventValidation]
public class Table : WebControl, IPostBackEventHandler {
#else
public class Table : WebControl {
#if NET_2_0
[Localizable (true)]
- [PersistenceMode (PersistenceMode.EncodedInnerDefaultProperty)]
+ [PersistenceMode (PersistenceMode.InnerDefaultProperty)]
#else
[Bindable (true)]
#endif
using System.Collections.Specialized;
using System.ComponentModel;
-
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
[DataBindingHandler ("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
[DefaultEvent ("TextChanged")]
[DefaultProperty ("Text")]
[Designer ("System.Web.UI.Design.WebControls.PreviewControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
[ParseChildren (true, "Text")]
[ControlValueProperty ("Text", null)]
+ [SupportsEventValidation]
#else
[ParseChildren (false)]
#endif
}
}
- protected internal override bool IsEmpty {
+ // FIXME: shouldn't be part of the public API
+ public override bool IsEmpty {
get {
return (base.IsEmpty &&
!IsSet (CHILD_PADD) &&
using System.ComponentModel;
using System.Drawing;
+using System.Security.Permissions;
namespace System.Web.UI.WebControls {
+
+ // CAS
+ [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
#if NET_2_0
[PersistChildrenAttribute (false, false)]
[ParseChildrenAttribute (true, ChildControlType = typeof(Control))]
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+#if NET_2_0
+ [EditorBrowsable (EditorBrowsableState.Never)]
+#endif
public bool ControlStyleCreated {
get {
return style != null;