Author: marek
Date: 2007-12-04 07:57:54 -0500 (Tue, 04 Dec 2007)
New Revision: 90663
Added:
trunk/mcs/class/System.Core/System.Linq.Expressions/ElementInit.cs
Removed:
trunk/mcs/class/System.Core/System.Linq.Expressions/Funclet.cs
trunk/mcs/class/System.Core/System.Linq.Expressions/FuncletExpression.cs
trunk/mcs/class/System.Core/System.Linq.Expressions/LiftExpression.cs
Modified:
trunk/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs
trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog
trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
trunk/mcs/class/System.Core/System.Linq.Expressions/ExpressionType.cs
trunk/mcs/class/System.Core/System.Linq.Expressions/ListInitExpression.cs
trunk/mcs/class/System.Core/System.Linq.Expressions/MemberListBinding.cs
trunk/mcs/class/System.Core/System.Linq.Expressions/NewExpression.cs
Log:
2007-12-04 Marek Safar <[EMAIL PROTECTED]>
* ElementInit.cs: New implementation.
* Funclet.cs, FuncletExpression.cs, LiftExpression.cs: Removed.
* ListInitExpression.cs, MemberListBinding.cs, Expression.cs,
ExpressionType.cs, BinaryExpression.cs, NewExpression.cs: API update.
Modified:
trunk/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs
2007-12-04 12:57:54 UTC (rev 90663)
@@ -50,6 +50,11 @@
#endregion
#region Properties
+ [MonoTODO]
+ public LambdaExpression Conversion {
+ get { throw new System.NotImplementedException (); }
+ }
+
public Expression Left {
get { return left; }
}
Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog
2007-12-04 12:57:54 UTC (rev 90663)
@@ -1,3 +1,11 @@
+2007-12-04 Marek Safar <[EMAIL PROTECTED]>
+
+ * ElementInit.cs: New implementation.
+
+ * Funclet.cs, FuncletExpression.cs, LiftExpression.cs: Removed.
+ * ListInitExpression.cs, MemberListBinding.cs, Expression.cs,
+ ExpressionType.cs, BinaryExpression.cs, NewExpression.cs: API update.
+
2007-08-17 Federico Di Gregorio <[EMAIL PROTECTED]>
* Expression.cs: fixed Field() and Property() behaviour when accessing
static
Added: trunk/mcs/class/System.Core/System.Linq.Expressions/ElementInit.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/ElementInit.cs
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/ElementInit.cs
2007-12-04 12:57:54 UTC (rev 90663)
@@ -0,0 +1,55 @@
+//
+// ElementInit.cs
+//
+// Authors:
+// Marek Safar ([EMAIL PROTECTED])
+//
+// Copyright (C) 2007 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.
+//
+
+using System.Reflection;
+using System.Collections.ObjectModel;
+
+namespace System.Linq.Expressions
+{
+ public sealed class ElementInit
+ {
+ internal ElementInit ()
+ {
+ }
+
+ [MonoTODO]
+ public MethodInfo AddMethod {
+ get { throw new NotImplementedException (); }
+ }
+
+ [MonoTODO]
+ public ReadOnlyCollection<Expression> Arguments {
+ get { throw new NotImplementedException (); }
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
Property changes on:
trunk/mcs/class/System.Core/System.Linq.Expressions/ElementInit.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
2007-12-04 12:57:54 UTC (rev 90663)
@@ -727,16 +727,6 @@
}
#endregion
- public static FuncletExpression Funclet(Funclet funclet, Type type)
- {
- if (funclet == null)
- throw new ArgumentNullException("funclet");
- if (type == null)
- throw new ArgumentNullException("type");
-
- return new FuncletExpression(funclet, type);
- }
-
public static Type GetFuncType(params Type[] typeArgs)
{
if (typeArgs == null)
@@ -773,22 +763,22 @@
}
#endregion
- public static ListInitExpression ListInit(NewExpression newExpression,
params Expression[] initializers)
+ public static ListInitExpression ListInit(NewExpression newExpression,
params ElementInit[] initializers)
{
if (initializers == null)
throw new ArgumentNullException("inizializers");
- return ListInit(newExpression,
Enumerable.ToReadOnlyCollection<Expression>(initializers));
+ return ListInit(newExpression,
Enumerable.ToReadOnlyCollection<ElementInit>(initializers));
}
- public static ListInitExpression ListInit(NewExpression newExpression,
IEnumerable<Expression> initializers)
+ public static ListInitExpression ListInit(NewExpression newExpression,
IEnumerable<ElementInit> initializers)
{
if (newExpression == null)
throw new ArgumentNullException("newExpression");
if (initializers == null)
throw new ArgumentNullException("inizializers");
- return new ListInitExpression(newExpression,
Enumerable.ToReadOnlyCollection<Expression>(initializers));
+ return new ListInitExpression(newExpression,
Enumerable.ToReadOnlyCollection<ElementInit>(initializers));
}
public static MemberInitExpression MemberInit(NewExpression
newExpression, IEnumerable<MemberBinding> bindings)
Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/ExpressionType.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/ExpressionType.cs
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/ExpressionType.cs
2007-12-04 12:57:54 UTC (rev 90663)
@@ -22,7 +22,6 @@
namespace System.Linq.Expressions
{
- [Serializable]
public enum ExpressionType
{
Add,
@@ -32,8 +31,6 @@
ArrayLength,
ArrayIndex,
Call,
- [Obsolete] CallVirtual,
- [Obsolete] Cast,
Coalesce,
Conditional,
Constant,
@@ -42,7 +39,6 @@
Divide,
Equal,
ExclusiveOr,
- Funclet,
GreaterThan,
GreaterThanOrEqual,
Invoke,
@@ -50,11 +46,6 @@
LeftShift,
LessThan,
LessThanOrEqual,
- [Obsolete] Lift,
- [Obsolete] LiftEqual,
- [Obsolete] LiftFalse,
- [Obsolete] LiftNotEqual,
- [Obsolete] LiftTrue,
ListInit,
MemberAccess,
MemberInit,
@@ -62,6 +53,7 @@
Multiply,
MultiplyChecked,
Negate,
+ UnaryPlus,
NegateChecked,
New,
NewArrayInit,
@@ -71,6 +63,7 @@
Or,
OrElse,
Parameter,
+ Power,
Quote,
RightShift,
Subtract,
Deleted: trunk/mcs/class/System.Core/System.Linq.Expressions/Funclet.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/Funclet.cs
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/Funclet.cs
2007-12-04 12:57:54 UTC (rev 90663)
@@ -1,6 +0,0 @@
-using System;
-
-namespace System.Linq.Expressions
-{
- public delegate object Funclet();
-}
\ No newline at end of file
Deleted:
trunk/mcs/class/System.Core/System.Linq.Expressions/FuncletExpression.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/FuncletExpression.cs
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/FuncletExpression.cs
2007-12-04 12:57:54 UTC (rev 90663)
@@ -1,33 +0,0 @@
-using System.Text;
-
-namespace System.Linq.Expressions
-{
- public sealed class FuncletExpression : Expression
- {
- #region .ctor
- internal FuncletExpression(Funclet funclet, Type type)
- : base(ExpressionType.Funclet, type)
- {
- this.funclet = funclet;
- }
- #endregion
-
- #region Fields
- private Funclet funclet;
- #endregion
-
- #region Properties
- public new Funclet Funclet
- {
- get { return funclet; }
- }
- #endregion
-
- #region Internal Methods
- internal override void BuildString(StringBuilder builder)
- {
- //TODO:
- }
- #endregion
- }
-}
\ No newline at end of file
Deleted: trunk/mcs/class/System.Core/System.Linq.Expressions/LiftExpression.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/LiftExpression.cs
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/LiftExpression.cs
2007-12-04 12:57:54 UTC (rev 90663)
@@ -1,88 +0,0 @@
-// 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
-//
-// Authors:
-// Antonello Provenzano <[EMAIL PROTECTED]>
-//
-
-using System.Collections.ObjectModel;
-using System.Text;
-
-namespace System.Linq.Expressions
-{
- [Obsolete]
- public sealed class LiftExpression : Expression
- {
- #region .ctor
- internal LiftExpression(ExpressionType eType, Type resultType,
Expression expression, ReadOnlyCollection<ParameterExpression> parameters,
ReadOnlyCollection<Expression> arguments)
- : base(eType, resultType)
- {
- this.expression = expression;
- this.parameters = parameters;
- this.arguments = arguments;
- }
- #endregion
-
- #region Fields
- private ReadOnlyCollection<Expression> arguments;
- private Expression expression;
- private ReadOnlyCollection<ParameterExpression> parameters;
- #endregion
-
- #region Properties
- public ReadOnlyCollection<Expression> Arguments
- {
- get { return arguments; }
- }
-
- public Expression Expression
- {
- get { return expression; }
- }
-
- public ReadOnlyCollection<ParameterExpression> Parameters
- {
- get { return parameters; }
- }
- #endregion
-
- #region Internal Methods
- internal override void BuildString(StringBuilder builder)
- {
- builder.Append(NodeType);
- builder.Append("(");
-
- int parCount = parameters.Count;
- for (int i = 0; i < parCount; i++)
- {
- parameters[i].BuildString(builder);
- builder.Append("=");
- arguments[i].BuildString(builder);
-
- if (i < parCount - 1)
- builder.Append(", ");
- }
-
- builder.Append(", ");
- expression.BuildString(builder);
-
- builder.Append(")");
- }
- #endregion
- }
-}
\ No newline at end of file
Modified:
trunk/mcs/class/System.Core/System.Linq.Expressions/ListInitExpression.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/ListInitExpression.cs
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/ListInitExpression.cs
2007-12-04 12:57:54 UTC (rev 90663)
@@ -28,23 +28,23 @@
public sealed class ListInitExpression : Expression
{
#region .ctor
- internal ListInitExpression(NewExpression newExpression,
ReadOnlyCollection<Expression> expressions)
+ internal ListInitExpression(NewExpression newExpression,
ReadOnlyCollection<ElementInit> expressions)
: base(ExpressionType.ListInit, newExpression.Type)
{
this.newExpression = newExpression;
- this.expressions = expressions;
+ this.initializers = initializers;
}
#endregion
#region Fields
- private ReadOnlyCollection<Expression> expressions;
+ private ReadOnlyCollection<ElementInit> initializers;
private NewExpression newExpression;
#endregion
#region Properties
- public ReadOnlyCollection<Expression> Expressions
+ public ReadOnlyCollection<ElementInit> Initializers
{
- get { return expressions; }
+ get { return initializers; }
}
public NewExpression NewExpression
@@ -62,12 +62,13 @@
//... and the elements of the list ...
builder.Append("{");
- int exprc = expressions.Count;
+ int exprc = initializers.Count;
for (int i = 0; i < exprc; i++)
{
- expressions[i].BuildString(builder);
- if (i < expressions.Count - 1)
- builder.Append(", ");
+ throw new System.NotImplementedException ();
+ //initializers[i].BuildString(builder);
+ //if (i < initializers.Count - 1)
+ // builder.Append(", ");
}
builder.Append("}");
Modified:
trunk/mcs/class/System.Core/System.Linq.Expressions/MemberListBinding.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/MemberListBinding.cs
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/MemberListBinding.cs
2007-12-04 12:57:54 UTC (rev 90663)
@@ -37,13 +37,13 @@
#endregion
#region Fields
- private ReadOnlyCollection<Expression> expressions;
+ ReadOnlyCollection<Expression> expressions;
+ ReadOnlyCollection<ElementInit> initializers;
#endregion
#region Properties
- public ReadOnlyCollection<Expression> Expressions
- {
- get { return expressions; }
+ public ReadOnlyCollection<ElementInit> Initializers {
+ get { return initializers; }
}
#endregion
Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/NewExpression.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/NewExpression.cs
2007-12-04 12:54:40 UTC (rev 90662)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/NewExpression.cs
2007-12-04 12:57:54 UTC (rev 90663)
@@ -38,7 +38,8 @@
#endregion
#region Fields
- private ReadOnlyCollection<Expression> arguments;
+ ReadOnlyCollection<Expression> arguments;
+ ReadOnlyCollection<MemberInfo> members;
private ConstructorInfo constructor;
#endregion
@@ -52,6 +53,11 @@
{
get { return constructor; }
}
+
+ public ReadOnlyCollection<MemberInfo> Members {
+ get { return members; }
+ }
+
#endregion
#region Internal Methods
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches