Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@ -38,20 +38,15 @@ namespace System.Web.UI.WebControls {
[ControlBuilder(typeof(LiteralControlBuilder))]
[DataBindingHandler("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
[DefaultProperty("Text")]
#if NET_2_0
[Designer ("System.Web.UI.Design.WebControls.LiteralDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
#endif
public class Literal : Control
#if NET_2_0
, ITextControl
#endif
{
public Literal ()
{
}
#if NET_2_0
[DefaultValue (LiteralMode.Transform)]
[WebSysDescription ("")]
[WebCategory ("Behavior")]
@ -66,15 +61,12 @@ namespace System.Web.UI.WebControls {
ViewState ["Mode"] = value;
}
}
#endif
[Bindable(true)]
[DefaultValue("")]
[WebSysDescription ("")]
[WebCategory ("Appearance")]
#if NET_2_0
[Localizable (true)]
#endif
public string Text {
get {
return ViewState.GetString ("Text", String.Empty);
@ -84,13 +76,11 @@ namespace System.Web.UI.WebControls {
}
}
#if NET_2_0
[EditorBrowsable (EditorBrowsableState.Never)]
public override void Focus ()
{
throw new NotSupportedException ();
}
#endif
protected override ControlCollection CreateControlCollection ()
{
@ -110,18 +100,12 @@ namespace System.Web.UI.WebControls {
obj.GetType ()));
}
#if NET_2_0
protected internal
#else
protected
#endif
override void Render (HtmlTextWriter output)
{
#if NET_2_0
if (Mode == LiteralMode.Encode)
output.Write (HttpUtility.HtmlEncode (Text));
else
#endif
output.Write (Text);
}
}