Imported Upstream version 5.2.0.175

Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-06-07 13:16:24 +00:00
parent 4bdbaf4a88
commit 966bba02bb
8776 changed files with 346420 additions and 149650 deletions

View File

@ -48,9 +48,9 @@ namespace System.Web.UI {
this.bag = bag;
}
public override bool Equals (object obj)
public override bool Equals (object o)
{
AttributeCollection other = obj as AttributeCollection;
AttributeCollection other = o as AttributeCollection;
if (other == null) {
return false;
}

View File

@ -167,14 +167,14 @@ namespace System.Web.UI {
return (bool) attr_render [null];
}
protected override bool OnStyleAttributeRender (string styleAttrName, string value, HtmlTextWriterStyle key)
protected override bool OnStyleAttributeRender (string name, string value, HtmlTextWriterStyle key)
{
return key == HtmlTextWriterStyle.Display;
}
protected override bool OnTagRender (string name, HtmlTextWriterTag tag)
protected override bool OnTagRender (string name, HtmlTextWriterTag key)
{
return tag != HtmlTextWriterTag.Span;
return key != HtmlTextWriterTag.Span;
}
}
}

View File

@ -41,14 +41,14 @@ public sealed class CompiledTemplateBuilder : ITemplate
{
BuildTemplateMethod templateMethod;
public CompiledTemplateBuilder (BuildTemplateMethod templateMethod)
public CompiledTemplateBuilder (BuildTemplateMethod buildTemplateMethod)
{
this.templateMethod = templateMethod;
this.templateMethod = buildTemplateMethod;
}
public void InstantiateIn (Control ctrl)
public void InstantiateIn (Control container)
{
templateMethod (ctrl);
templateMethod (container);
}
}
}

View File

@ -1950,7 +1950,7 @@ namespace System.Web.UI
Page.SetFocus (this);
}
protected internal virtual void LoadControlState (object state)
protected internal virtual void LoadControlState (object savedState)
{
}

View File

@ -183,12 +183,12 @@ namespace System.Web.UI {
return new SimpleEnumerator (this);
}
public virtual int IndexOf (Control c)
public virtual int IndexOf (Control value)
{
if (controls == null || c == null)
if (controls == null || value == null)
return -1;
return Array.IndexOf (controls, c);
return Array.IndexOf (controls, value);
}
public virtual void Remove (Control value)

View File

@ -38,21 +38,21 @@ namespace System.Web.UI {
object propertyValue;
Type propertyType;
public ControlValuePropertyAttribute (string propName)
public ControlValuePropertyAttribute (string name)
{
this.propertyName = propName;
this.propertyName = name;
}
public ControlValuePropertyAttribute (string propName, object propValue)
public ControlValuePropertyAttribute (string name, object defaultValue)
{
this.propertyName = propName;
this.propertyValue = propValue;
this.propertyName = name;
this.propertyValue = defaultValue;
}
public ControlValuePropertyAttribute (string propName, Type type, string propValue)
public ControlValuePropertyAttribute (string name, Type type, string defaultValue)
{
this.propertyName = propName;
this.propertyValue = propValue;
this.propertyName = name;
this.propertyValue = defaultValue;
this.propertyType = type;
}

View File

@ -167,9 +167,9 @@ namespace System.Web.UI {
return prop.GetValue (container, args);
}
public static string GetIndexedPropertyValue (object container, string expr, string format)
public static string GetIndexedPropertyValue (object container, string propName, string format)
{
object result = GetIndexedPropertyValue (container, expr);
object result = GetIndexedPropertyValue (container, propName);
return FormatResult (result, format);
}

View File

@ -108,9 +108,9 @@ namespace System.Web.UI {
}
[EditorBrowsable (EditorBrowsableState.Never)]
public override void RenderControl (HtmlTextWriter tw)
public override void RenderControl (HtmlTextWriter writer)
{
base.RenderControl (tw);
base.RenderControl (writer);
}
[EditorBrowsable (EditorBrowsableState.Never)]

View File

@ -57,22 +57,22 @@ namespace System.Web.UI
this.sortExpression = sortExpression;
}
public DataSourceSelectArguments (int startingRowIndex, int maxRows)
public DataSourceSelectArguments (int startRowIndex, int maximumRows)
{
this.startingRowIndex = startingRowIndex;
this.maxRows = maxRows;
this.startingRowIndex = startRowIndex;
this.maxRows = maximumRows;
}
public DataSourceSelectArguments (string sortExpression, int startingRowIndex, int maxRows)
public DataSourceSelectArguments (string sortExpression, int startRowIndex, int maximumRows)
{
this.sortExpression = sortExpression;
this.startingRowIndex = startingRowIndex;
this.maxRows = maxRows;
this.startingRowIndex = startRowIndex;
this.maxRows = maximumRows;
}
public void AddSupportedCapabilities (DataSourceCapabilities srcCapabilities)
public void AddSupportedCapabilities (DataSourceCapabilities capabilities)
{
this.dsc = this.dsc | srcCapabilities;
this.dsc = this.dsc | capabilities;
}
// MSDN: The DataSourceSelectArguments class overrides the Object.Equals method to test

View File

@ -55,30 +55,30 @@ namespace System.Web.UI {
OnDataSourceViewChanged (EventArgs.Empty);
}
public virtual void Delete (IDictionary keys, IDictionary values,
DataSourceViewOperationCallback callBack)
public virtual void Delete (IDictionary keys, IDictionary oldValues,
DataSourceViewOperationCallback callback)
{
if (callBack == null)
if (callback == null)
throw new ArgumentNullException ("callBack");
int rowAffected;
try {
rowAffected = ExecuteDelete (keys, values);
rowAffected = ExecuteDelete (keys, oldValues);
}
catch (Exception e) {
if (!callBack (0, e))
if (!callback (0, e))
throw;
return;
}
callBack (rowAffected, null);
callback (rowAffected, null);
}
protected virtual int ExecuteDelete(IDictionary keys, IDictionary values)
protected virtual int ExecuteDelete(IDictionary keys, IDictionary oldValues)
{
throw new NotSupportedException ();
}
protected virtual int ExecuteInsert (IDictionary keys)
protected virtual int ExecuteInsert (IDictionary values)
{
throw new NotSupportedException();
}
@ -93,29 +93,29 @@ namespace System.Web.UI {
}
public virtual void Insert (IDictionary values,
DataSourceViewOperationCallback callBack)
DataSourceViewOperationCallback callback)
{
if (callBack == null)
throw new ArgumentNullException("callBack");
if (callback == null)
throw new ArgumentNullException("callback");
int rowAffected;
try {
rowAffected = ExecuteInsert (values);
} catch (Exception e) {
if (!callBack (0, e))
if (!callback (0, e))
throw;
return;
}
callBack (rowAffected, null);
callback (rowAffected, null);
}
protected virtual void OnDataSourceViewChanged (EventArgs eventArgs)
protected virtual void OnDataSourceViewChanged (EventArgs e)
{
if (eventsList != null) {
EventHandler evtHandler = eventsList [EventDataSourceViewChanged] as EventHandler;
if (evtHandler != null)
evtHandler(this, eventArgs);
evtHandler(this, e);
}
}
@ -137,34 +137,34 @@ namespace System.Web.UI {
return;
}
public virtual void Select (DataSourceSelectArguments selectArgs,
DataSourceViewSelectCallback callBack)
public virtual void Select (DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback)
{
if (callBack == null)
if (callback == null)
throw new ArgumentNullException("callBack");
selectArgs.RaiseUnsupportedCapabilitiesError (this);
arguments.RaiseUnsupportedCapabilitiesError (this);
IEnumerable selectList = ExecuteSelect (selectArgs);
callBack (selectList);
IEnumerable selectList = ExecuteSelect (arguments);
callback (selectList);
}
public virtual void Update(IDictionary keys, IDictionary values,
IDictionary oldValues, DataSourceViewOperationCallback callBack)
IDictionary oldValues, DataSourceViewOperationCallback callback)
{
if (callBack == null)
throw new ArgumentNullException ("callBack");
if (callback == null)
throw new ArgumentNullException ("callback");
int rowAffected;
try {
rowAffected = ExecuteUpdate (keys, values, oldValues);
} catch (Exception e) {
if (!callBack (0, e))
if (!callback (0, e))
throw;
return;
}
callBack (rowAffected, null);
callback (rowAffected, null);
}
public virtual bool CanDelete { get { return false; } }

View File

@ -32,5 +32,5 @@ using System;
namespace System.Web.UI
{
public delegate bool DataSourceViewOperationCallback (int recordsAffected, Exception exception);
public delegate bool DataSourceViewOperationCallback (int affectedRecords, Exception ex);
}

View File

@ -91,9 +91,9 @@ namespace System.Web.UI {
OnChanged (new EventArgs ());
}
public bool Contains (string propertyName)
public bool Contains (string propName)
{
return list.Contains (propertyName);
return list.Contains (propName);
}
public void CopyTo (Array array, int index)
@ -101,17 +101,17 @@ namespace System.Web.UI {
list.CopyTo (array, index);
}
public void CopyTo (ExpressionBinding [] bindings, int index)
public void CopyTo (ExpressionBinding [] array, int index)
{
if (index < 0)
throw new ArgumentNullException ("Index cannot be negative");
if (index >= bindings.Length)
if (index >= array.Length)
throw new ArgumentException ("Index cannot be greater than or equal to length of array passed");
if (list.Count > (bindings.Length - index + 1))
if (list.Count > (array.Length - index + 1))
throw new ArgumentException ("Number of elements in source is greater than available space from index to end of destination");
foreach (string key in list.Keys)
bindings [index++] = (ExpressionBinding) list [key];
array [index++] = (ExpressionBinding) list [key];
}
public IEnumerator GetEnumerator ()

View File

@ -112,9 +112,9 @@ namespace System.Web.UI {
}
public virtual void AddAttribute (string name, string value, bool fEncode)
public virtual void AddAttribute (string name, string value, bool fEndode)
{
if (fEncode)
if (fEndode)
value = HttpUtility.HtmlAttributeEncode (value);
AddAttribute (name, value, GetAttributeKey (name));
@ -562,10 +562,10 @@ namespace System.Web.UI {
b.Write (format, arg0, arg1);
}
public override void Write (string format, params object [] args)
public override void Write (string format, params object [] arg)
{
OutputTabs ();
b.Write (format, args);
b.Write (format, arg);
}
public override void Write (string s)
@ -680,10 +680,10 @@ namespace System.Web.UI {
newline = true;
}
public override void WriteLine (string format, params object [] args)
public override void WriteLine (string format, params object [] arg)
{
OutputTabs ();
b.WriteLine (format, args);
b.WriteLine (format, arg);
newline = true;
}

View File

@ -62,9 +62,9 @@ namespace System.Web.UI {
}
}
protected internal override void Render (HtmlTextWriter writer)
protected internal override void Render (HtmlTextWriter output)
{
writer.Write (_text);
output.Write (_text);
}
protected override ControlCollection CreateControlCollection ()

View File

@ -1600,17 +1600,17 @@ public partial class Page : TemplateControl, IHttpHandler
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
protected virtual void SavePageStateToPersistenceMedium (object viewState)
protected virtual void SavePageStateToPersistenceMedium (object state)
{
PageStatePersister persister = this.PageStatePersister;
if (persister == null)
return;
Pair pair = viewState as Pair;
Pair pair = state as Pair;
if (pair != null) {
persister.ViewState = pair.First;
persister.ControlState = pair.Second;
} else
persister.ViewState = viewState;
persister.ViewState = state;
persister.Save ();
}
@ -2531,9 +2531,9 @@ public partial class Page : TemplateControl, IHttpHandler
[MonoDocumentationNote ("Not implemented. Only used by .net aspx parser")]
[EditorBrowsable (EditorBrowsableState.Never)]
protected object GetWrappedFileDependencies (string [] list)
protected object GetWrappedFileDependencies (string [] virtualFileDependencies)
{
return list;
return virtualFileDependencies;
}
[MonoDocumentationNote ("Does nothing. Used by .net aspx parser")]

View File

@ -39,9 +39,9 @@ namespace System.Web.UI
{
}
public virtual IHttpHandler GetHandler (HttpContext context, string requestType, string url, string path)
public virtual IHttpHandler GetHandler (HttpContext context, string requestType, string virtualPath, string path)
{
return PageParser.GetCompiledPageInstance (url, path, context);
return PageParser.GetCompiledPageInstance (virtualPath, path, context);
}
public virtual void ReleaseHandler (IHttpHandler handler)

View File

@ -35,10 +35,10 @@ namespace System.Web.UI
[Serializable]
public sealed class Pair
{
public Pair (object first, object second)
public Pair (object x, object y)
{
First = first;
Second = second;
First = x;
Second = y;
}
public Pair ()

View File

@ -40,10 +40,10 @@ namespace System.Web.UI
Type containerType;
BindingDirection direction;
public TemplateContainerAttribute (Type containerType, BindingDirection direction)
public TemplateContainerAttribute (Type containerType, BindingDirection bindingDirection)
{
this.containerType = containerType;
this.direction = direction;
this.direction = bindingDirection;
}
public BindingDirection BindingDirection {

View File

@ -226,22 +226,22 @@ namespace System.Web.UI
return LoadControl (type, null);
}
public Control LoadControl (Type type, object[] parameters)
public Control LoadControl (Type t, object[] parameters)
{
object [] attrs = null;
if (type != null)
type.GetCustomAttributes (typeof (PartialCachingAttribute), true);
if (t != null)
t.GetCustomAttributes (typeof (PartialCachingAttribute), true);
if (attrs != null && attrs.Length == 1) {
PartialCachingAttribute attr = (PartialCachingAttribute) attrs [0];
PartialCachingControl ctrl = new PartialCachingControl (type, parameters);
PartialCachingControl ctrl = new PartialCachingControl (t, parameters);
ctrl.VaryByParams = attr.VaryByParams;
ctrl.VaryByControls = attr.VaryByControls;
ctrl.VaryByCustom = attr.VaryByCustom;
return ctrl;
}
object control = Activator.CreateInstance (type, parameters);
object control = Activator.CreateInstance (t, parameters);
if (control is UserControl)
((UserControl) control).InitializeAsUserControl (Page);
@ -495,34 +495,34 @@ namespace System.Web.UI
return DataBinder.Eval (Page.GetDataItem(), expression, format);
}
protected internal object XPath (string xpathexpression)
protected internal object XPath (string xPathExpression)
{
return XPathBinder.Eval (Page.GetDataItem(), xpathexpression);
return XPathBinder.Eval (Page.GetDataItem(), xPathExpression);
}
protected internal object XPath (string xpathexpression, IXmlNamespaceResolver resolver)
protected internal object XPath (string xPathExpression, IXmlNamespaceResolver resolver)
{
return XPathBinder.Eval (Page.GetDataItem (), xpathexpression, null, resolver);
return XPathBinder.Eval (Page.GetDataItem (), xPathExpression, null, resolver);
}
protected internal string XPath (string xpathexpression, string format)
protected internal string XPath (string xPathExpression, string format)
{
return XPathBinder.Eval (Page.GetDataItem(), xpathexpression, format);
return XPathBinder.Eval (Page.GetDataItem(), xPathExpression, format);
}
protected internal string XPath (string xpathexpression, string format, IXmlNamespaceResolver resolver)
protected internal string XPath (string xPathExpression, string format, IXmlNamespaceResolver resolver)
{
return XPathBinder.Eval (Page.GetDataItem (), xpathexpression, format, resolver);
return XPathBinder.Eval (Page.GetDataItem (), xPathExpression, format, resolver);
}
protected internal IEnumerable XPathSelect (string xpathexpression)
protected internal IEnumerable XPathSelect (string xPathExpression)
{
return XPathBinder.Select (Page.GetDataItem(), xpathexpression);
return XPathBinder.Select (Page.GetDataItem(), xPathExpression);
}
protected internal IEnumerable XPathSelect (string xpathexpression, IXmlNamespaceResolver resolver)
protected internal IEnumerable XPathSelect (string xPathExpression, IXmlNamespaceResolver resolver)
{
return XPathBinder.Select (Page.GetDataItem (), xpathexpression, resolver);
return XPathBinder.Select (Page.GetDataItem (), xPathExpression, resolver);
}
// IFilterResolutionService

View File

@ -42,22 +42,22 @@ namespace System.Web.UI
{
}
public static object Eval (object container, string xpath)
public static object Eval (object container, string xPath)
{
return Eval (container, xpath, (IXmlNamespaceResolver)null);
return Eval (container, xPath, (IXmlNamespaceResolver)null);
}
public static object Eval (object container, string xpath, IXmlNamespaceResolver resolver)
public static object Eval (object container, string xPath, IXmlNamespaceResolver resolver)
{
if (xpath == null || xpath.Length == 0)
throw new ArgumentNullException ("xpath");
if (xPath == null || xPath.Length == 0)
throw new ArgumentNullException ("xPath");
IXPathNavigable factory = container as IXPathNavigable;
if (factory == null)
throw new ArgumentException ("container");
object result = factory.CreateNavigator ().Evaluate (xpath, resolver);
object result = factory.CreateNavigator ().Evaluate (xPath, resolver);
XPathNodeIterator itr = result as XPathNodeIterator;
if (itr != null) {
@ -70,14 +70,14 @@ namespace System.Web.UI
return result;
}
public static string Eval (object container, string xpath, string format)
public static string Eval (object container, string xPath, string format)
{
return Eval (container, xpath, format, null);
return Eval (container, xPath, format, null);
}
public static string Eval (object container, string xpath, string format, IXmlNamespaceResolver resolver)
public static string Eval (object container, string xPath, string format, IXmlNamespaceResolver resolver)
{
object result = Eval (container, xpath, resolver);
object result = Eval (container, xPath, resolver);
if (result == null)
return String.Empty;
@ -87,22 +87,22 @@ namespace System.Web.UI
return String.Format (format, result);
}
public static IEnumerable Select (object container, string xpath)
public static IEnumerable Select (object container, string xPath)
{
return Select (container, xpath, null);
return Select (container, xPath, null);
}
public static IEnumerable Select (object container, string xpath, IXmlNamespaceResolver resolver)
public static IEnumerable Select (object container, string xPath, IXmlNamespaceResolver resolver)
{
if (xpath == null || xpath.Length == 0)
throw new ArgumentNullException ("xpath");
if (xPath == null || xPath.Length == 0)
throw new ArgumentNullException ("xPath");
IXPathNavigable factory = container as IXPathNavigable;
if (factory == null)
throw new ArgumentException ("container");
XPathNodeIterator itr = factory.CreateNavigator ().Select (xpath, resolver);
XPathNodeIterator itr = factory.CreateNavigator ().Select (xPath, resolver);
ArrayList ret = new ArrayList ();
while (itr.MoveNext ()) {