Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
2008-01-15 Dean Brettle <dean@brettle.com>
* WebControlAdapter.cs, HierarchicalDataBoundControlAdapter.cs,
DataBoundControlAdapter.cs: changed to use ControlAdapter.control
instead of using base.Control or using a new control field.
* MenuAdapter.cs: added internal constructor that takes a Menu
parameter. The constructor is used when writing unit tests.
* MenuAdapter.cs (OnInit, OnPreRender, RenderBeginTag,
RenderContents, RenderEndTag): delegate to base instead of
Control.
* MenuAdapter.cs (LoadAdapterControlState, SaveAdapterControlState,
RaisePostBackEvent, RenderItem): implemented.
2008-01-13 Dean Brettle <dean@brettle.com>
* WebControlAdapter.cs (RenderContents): changed to call
control.RenderContents() instead of control.Render().
* WebControlAdapter.cs, HierarchicalDataBoundControlAdapter.cs,
DataBoundControlAdapter.cs, HideDisabledControlAdapter.cs: added
internal constructor that takes a parameter of the corresponding
Control type. The construct is used when writing unit tests.
2005-08-24 Chris Toshok <toshok@ximian.com>
* MenuAdapter.cs (OnInit): Call "Page.RegisterRequiresControlState
(Control)" as the docs point out.
(LoadAdapterControlState): throw NIE and flag TODO.
2005-08-24 Chris Toshok <toshok@ximian.com>
* HierarchicalDataBoundControlAdapter.cs (PerformDataBinding):
this takes no arguments.
2005-08-24 Chris Toshok <toshok@ximian.com>
* WebControlAdapter.cs, HierarchicalDataBoundControlAdapter.cs,
DataBoundControlAdapter.cs, HideDisabledControlAdapter.cs,
MenuAdapter.cs: fix namespace.
2005-08-24 Chris Toshok <toshok@ximian.com>
* DataBoundControlAdapter.cs, HideDisabledControlAdapter.cs,
HierarchicalDataBoundControlAdapter.cs, MenuAdapter.cs,
WebControlAdapter.cs: initial implementations. Mostly completely
(as per msdn2 docs, anyway).

View File

@@ -0,0 +1,62 @@
//
// System.Web.UI.WebControls.Adapters.DataBoundControlAdapter
//
// Author:
// Chris Toshok <toshok@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
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace System.Web.UI.WebControls.Adapters
{
public class DataBoundControlAdapter : WebControlAdapter
{
public DataBoundControlAdapter ()
{
}
internal DataBoundControlAdapter (DataBoundControl c) : base (c)
{
}
protected internal virtual void PerformDataBinding (IEnumerable data)
{
Control.PerformDataBinding (data);
}
protected new DataBoundControl Control
{
get {
return (DataBoundControl)control;
}
}
}
}
#endif

View File

@@ -0,0 +1,57 @@
//
// System.Web.UI.WebControls.Adapters.HideDisabledControlAdapter
//
// Author:
// Chris Toshok <toshok@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
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace System.Web.UI.WebControls.Adapters
{
public class HideDisabledControlAdapter : WebControlAdapter
{
public HideDisabledControlAdapter ()
{
}
internal HideDisabledControlAdapter (WebControl c) : base (c)
{
}
protected internal override void Render(HtmlTextWriter writer)
{
if (!Control.IsEnabled)
return;
base.Render (writer);
}
}
}
#endif

View File

@@ -0,0 +1,62 @@
//
// System.Web.UI.WebControls.Adapters.HierarchicalDataBoundControlAdapter
//
// Author:
// Chris Toshok <toshok@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
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace System.Web.UI.WebControls.Adapters
{
public class HierarchicalDataBoundControlAdapter : WebControlAdapter
{
public HierarchicalDataBoundControlAdapter ()
{
}
internal HierarchicalDataBoundControlAdapter (HierarchicalDataBoundControl c) : base (c)
{
}
protected internal virtual void PerformDataBinding ()
{
Control.PerformDataBinding ();
}
protected new HierarchicalDataBoundControl Control
{
get {
return (HierarchicalDataBoundControl)control;
}
}
}
}
#endif

View File

@@ -0,0 +1,108 @@
//
// System.Web.UI.WebControls.Adapters.MenuAdapter
//
// Author:
// Chris Toshok <toshok@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
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace System.Web.UI.WebControls.Adapters
{
public class MenuAdapter : WebControlAdapter, IPostBackEventHandler
{
public MenuAdapter ()
{
}
internal MenuAdapter (Menu c) : base (c)
{
}
protected internal override void OnInit (EventArgs e)
{
base.OnInit (e);
}
protected internal override void OnPreRender(EventArgs e)
{
base.OnPreRender (e);
}
protected virtual void RaisePostBackEvent (string eventArgument)
{
Control.RaisePostBackEvent (eventArgument);
}
protected override void RenderBeginTag (HtmlTextWriter writer)
{
base.RenderBeginTag (writer);
}
protected override void RenderContents (HtmlTextWriter writer)
{
base.RenderContents (writer);
}
protected override void RenderEndTag (HtmlTextWriter writer)
{
base.RenderEndTag (writer);
}
protected internal virtual void RenderItem (HtmlTextWriter writer,
MenuItem item,
int position)
{
Control.RenderItem (writer, item, position);
}
protected internal override void LoadAdapterControlState (object state)
{
}
protected internal override object SaveAdapterControlState ()
{
return null;
}
void System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (string eventArgument)
{
RaisePostBackEvent (eventArgument);
}
protected new Menu Control
{
get {
return (Menu)control;
}
}
}
}
#endif

View File

@@ -0,0 +1,86 @@
//
// System.Web.UI.WebControls.Adapters.WebControlAdapter
//
// Author:
// Chris Toshok <toshok@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
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Web.UI.Adapters;
namespace System.Web.UI.WebControls.Adapters
{
public class WebControlAdapter : ControlAdapter
{
public WebControlAdapter ()
{
}
internal WebControlAdapter (WebControl wc) : base (wc)
{
}
protected internal override void Render (HtmlTextWriter writer)
{
RenderBeginTag (writer);
RenderContents (writer);
RenderEndTag (writer);
}
protected virtual void RenderBeginTag (HtmlTextWriter writer)
{
Control.RenderBeginTag (writer);
}
protected virtual void RenderContents(HtmlTextWriter writer)
{
Control.RenderContents (writer);
}
protected virtual void RenderEndTag(HtmlTextWriter writer)
{
Control.RenderEndTag (writer);
}
protected new WebControl Control
{
get {
return (WebControl)control;
}
}
protected bool IsEnabled
{
get {
return Control.IsEnabled;
}
}
}
}
#endif