diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Core.Contracts10.csproj b/Microsoft.Research/Contracts/System.Core.Contracts/System.Core.Contracts10.csproj index 0a887fca..dd4ea6ca 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Core.Contracts10.csproj +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Core.Contracts10.csproj @@ -243,6 +243,7 @@ + diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.BinaryExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.BinaryExpression.cs index a396bd8d..237000de 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.BinaryExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.BinaryExpression.cs @@ -99,5 +99,35 @@ public Expression Right return default(Expression); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // left: + // The System.Linq.Expressions.BinaryExpression.Left property of the result. + // + // conversion: + // The System.Linq.Expressions.BinaryExpression.Conversion property of the result. + // + // right: + // The System.Linq.Expressions.BinaryExpression.Right property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public BinaryExpression Update(Expression left, LambdaExpression conversion, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } +#endif + } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.BlockExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.BlockExpression.cs index 04c01101..f99169b3 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.BlockExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.BlockExpression.cs @@ -40,6 +40,7 @@ public ReadOnlyCollection Expressions get { Contract.Ensures(Contract.Result>() != null); + Contract.Ensures(Contract.Result>().Count >= 1); return default(ReadOnlyCollection); } } @@ -135,9 +136,9 @@ protected internal override Expression Accept(ExpressionVisitor visitor) // Returns: // This expression if no children changed, or an expression with the updated // children. + [Pure] public BlockExpression Update(IEnumerable variables, IEnumerable expressions) { - Contract.Requires(variables != null); Contract.Requires(expressions != null); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.CatchBlock.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.CatchBlock.cs index 4ca28157..75f17465 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.CatchBlock.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.CatchBlock.cs @@ -42,8 +42,11 @@ sealed public partial class CatchBlock { #region Methods and constructors private CatchBlock() {} + [Pure] public CatchBlock Update(ParameterExpression variable, Expression filter, Expression body) { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); return default(CatchBlock); } #endregion @@ -53,6 +56,7 @@ public Expression Body { get { + Contract.Ensures(Contract.Result() != null); return default(Expression); } } @@ -69,6 +73,7 @@ public Type Test { get { + Contract.Ensures(Contract.Result() != null); return default(Type); } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ConditionalExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ConditionalExpression.cs index 3f3fceac..db11bcec 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ConditionalExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ConditionalExpression.cs @@ -68,5 +68,34 @@ public Expression Test return default(Expression); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression + // + // Parameters: + // test: + // The System.Linq.Expressions.ConditionalExpression.Test property of the result. + // + // ifTrue: + // The System.Linq.Expressions.ConditionalExpression.IfTrue property of the result. + // + // ifFalse: + // The System.Linq.Expressions.ConditionalExpression.IfFalse property of the result. + // + // Returns: + // This expression if no children changed, or an expression with the updated children. + [Pure] + public ConditionalExpression Update(Expression test, Expression ifTrue, Expression ifFalse) + { + Contract.Requires(test != null); + Contract.Requires(ifTrue != null); + Contract.Requires(ifFalse != null); + Contract.Ensures(Contract.Result() != null); + return default(ConditionalExpression); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.DebugInfoExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.DebugInfoExpression.cs index 7a3775f3..7bd55238 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.DebugInfoExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.DebugInfoExpression.cs @@ -55,6 +55,7 @@ public SymbolDocumentInfo Document { get { + Contract.Ensures(Contract.Result() != null); return default(SymbolDocumentInfo); } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.DynamicExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.DynamicExpression.cs index 2f33c6a5..e82b0833 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.DynamicExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.DynamicExpression.cs @@ -15,11 +15,13 @@ #if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // File System.Linq.Expressions.DynamicExpression.cs // Automatically generated contract file. +using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.IO; +using System.Runtime.CompilerServices; using System.Text; -using System.Diagnostics.Contracts; -using System; // Disable the "this variable is not used" warning as every field would imply it. #pragma warning disable 0414 @@ -49,34 +51,39 @@ protected internal override Expression Accept (ExpressionVisitor visitor) return default(Expression); } + [Pure] public DynamicExpression Update (IEnumerable arguments) { + Contract.Ensures(Contract.Result() != null); return default(DynamicExpression); } #endregion #region Properties and indexers - public System.Collections.ObjectModel.ReadOnlyCollection Arguments + public ReadOnlyCollection Arguments { get { - return default(System.Collections.ObjectModel.ReadOnlyCollection); + Contract.Ensures(Contract.Result>() != null); + return default(ReadOnlyCollection); } } - public System.Runtime.CompilerServices.CallSiteBinder Binder + public CallSiteBinder Binder { get { - return default(System.Runtime.CompilerServices.CallSiteBinder); + Contract.Ensures(Contract.Result() != null); + return default(CallSiteBinder); } } - public System.Type DelegateType + public Type DelegateType { get { - return default(System.Type); + Contract.Ensures(Contract.Result() != null); + return default(Type); } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ElementInit.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ElementInit.cs index a08f06bc..24341ca6 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ElementInit.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ElementInit.cs @@ -13,10 +13,11 @@ // 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; +using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.Reflection; using System.Text; -using System.Diagnostics.Contracts; namespace System.Linq.Expressions { @@ -56,9 +57,31 @@ public ReadOnlyCollection Arguments get { Contract.Ensures(Contract.Result>() != null); + Contract.Ensures(Contract.Result>().Count >= 1); return default(ReadOnlyCollection); } } +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // arguments: + // The System.Linq.Expressions.ElementInit.Arguments property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public ElementInit Update(IEnumerable arguments) + { + Contract.Requires(arguments != null); + Contract.Ensures(Contract.Result() != null); + return default(ElementInit); + } +#endif } -} +} \ No newline at end of file diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.Expression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.Expression.cs index 0b1ea971..56590f7b 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.Expression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.Expression.cs @@ -18,6 +18,7 @@ using System.Text; using System.Diagnostics.Contracts; using System.Reflection; +using System.Runtime.CompilerServices; // Disable the "this variable is not used" warning as every field would imply it. #pragma warning disable 0414 @@ -282,6 +283,19 @@ public Type Type } #endif +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Reduces the binary expression node to a simpler expression. + // + // Returns: + // The reduced expression. + public virtual Expression Reduce() + { + Contract.Ensures(Contract.Result() != null); + return default(Expression); + } +#endif // Summary: // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic @@ -317,7 +331,6 @@ public static BinaryExpression Add(Expression left, Expression right) Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } - // // Summary: // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic @@ -363,7 +376,7 @@ public static BinaryExpression Add(Expression left, Expression right, MethodInfo return default(BinaryExpression); } -#if !SILVERLIGHT_3_0 && !NETFRAMEWORK_3_5 +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: // Creates a System.Linq.Expressions.BinaryExpression that represents an addition @@ -383,6 +396,7 @@ public static BinaryExpression Add(Expression left, Expression right, MethodInfo // property equal to System.Linq.Expressions.ExpressionType.AddAssign and the // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right // properties set to the specified values. + [Pure] public static BinaryExpression AddAssign(Expression left, Expression right) { Contract.Requires(left != null); @@ -390,7 +404,6 @@ public static BinaryExpression AddAssign(Expression left, Expression right) Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } - // // Summary: // Creates a System.Linq.Expressions.BinaryExpression that represents an addition @@ -415,6 +428,7 @@ public static BinaryExpression AddAssign(Expression left, Expression right) // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, // and System.Linq.Expressions.BinaryExpression.Method properties set to the // specified values. + [Pure] public static BinaryExpression AddAssign(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); @@ -450,6 +464,7 @@ public static BinaryExpression AddAssign(Expression left, Expression right, Meth // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion // properties set to the specified values. + [Pure] public static BinaryExpression AddAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) { Contract.Requires(left != null); @@ -457,6 +472,9 @@ public static BinaryExpression AddAssign(Expression left, Expression right, Meth Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: // Creates a System.Linq.Expressions.BinaryExpression that represents an addition @@ -476,6 +494,7 @@ public static BinaryExpression AddAssign(Expression left, Expression right, Meth // property equal to System.Linq.Expressions.ExpressionType.AddAssignChecked // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right // properties set to the specified values. + [Pure] public static BinaryExpression AddAssignChecked(Expression left, Expression right) { Contract.Requires(left != null); @@ -507,6 +526,7 @@ public static BinaryExpression AddAssignChecked(Expression left, Expression righ // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, // and System.Linq.Expressions.BinaryExpression.Method properties set to the // specified values. + [Pure] public static BinaryExpression AddAssignChecked(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); @@ -514,7 +534,6 @@ public static BinaryExpression AddAssignChecked(Expression left, Expression righ Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } - // // Summary: // Creates a System.Linq.Expressions.BinaryExpression that represents an addition @@ -543,6 +562,7 @@ public static BinaryExpression AddAssignChecked(Expression left, Expression righ // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion // properties set to the specified values. + [Pure] public static BinaryExpression AddAssignChecked(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) { Contract.Requires(left != null); @@ -709,6 +729,7 @@ public static BinaryExpression And(Expression left, Expression right, MethodInfo Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } + // // Summary: // Creates a System.Linq.Expressions.BinaryExpression that represents a conditional @@ -790,6 +811,152 @@ public static BinaryExpression AndAlso(Expression left, Expression right, Method Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // AND assignment operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.AndAssign and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the specified + // values. + [Pure] + public static BinaryExpression AndAssign(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // AND assignment operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.AndAssign and the System.Linq.Expressions.BinaryExpression.Left, + // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method + // properties set to the specified values. + [Pure] + public static BinaryExpression AndAssign(Expression left, Expression right, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // AND assignment operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.AndAssign and the System.Linq.Expressions.BinaryExpression.Left, + // System.Linq.Expressions.BinaryExpression.Right, System.Linq.Expressions.BinaryExpression.Method, + // and System.Linq.Expressions.BinaryExpression.Conversion properties set to the + // specified values. + [Pure] + public static BinaryExpression AndAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates an System.Linq.Expressions.IndexExpression to access a multidimensional + // array. + // + // Parameters: + // array: + // An expression that represents the multidimensional array. + // + // indexes: + // An System.Collections.Generic.IEnumerable`1 containing expressions used to index + // the array. + // + // Returns: + // The created System.Linq.Expressions.IndexExpression. + [Pure] + public static IndexExpression ArrayAccess(Expression array, IEnumerable indexes) + { + Contract.Requires(array != null); + Contract.Requires(indexes != null); + Contract.Ensures(Contract.Result() != null); + return default(IndexExpression); + } + // + // Summary: + // Creates an System.Linq.Expressions.IndexExpression to access an array. + // + // Parameters: + // array: + // An expression representing the array to index. + // + // indexes: + // An array that contains expressions used to index the array. + // + // Returns: + // The created System.Linq.Expressions.IndexExpression. + [Pure] + public static IndexExpression ArrayAccess(Expression array, params Expression[] indexes) + { + Contract.Requires(array != null); + Contract.Requires(indexes != null); + Contract.Requires(indexes.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(IndexExpression); + } +#endif + // // Summary: // Creates a System.Linq.Expressions.BinaryExpression that represents applying @@ -898,9 +1065,11 @@ public static MethodCallExpression ArrayIndex(Expression array, params Expressio { Contract.Requires(array != null); Contract.Requires(indexes != null); + Contract.Requires(indexes.Length >= 1); Contract.Ensures(Contract.Result() != null); return default(MethodCallExpression); } + // // Summary: // Creates a System.Linq.Expressions.UnaryExpression that represents getting @@ -929,6 +1098,37 @@ public static UnaryExpression ArrayLength(Expression array) Contract.Ensures(Contract.Result() != null); return default(UnaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents an assignment + // operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Assign and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the specified + // values. + [Pure] + public static BinaryExpression Assign(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } +#endif + // // Summary: // Creates a System.Linq.Expressions.MemberAssignment that represents the initialization @@ -1002,7 +1202,8 @@ public static MemberAssignment Bind(MethodInfo propertyAccessor, Expression expr Contract.Ensures(Contract.Result() != null); return default(MemberAssignment); } -#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: // Creates a System.Linq.Expressions.BlockExpression that contains the given @@ -1014,8 +1215,10 @@ public static MemberAssignment Bind(MethodInfo propertyAccessor, Expression expr // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(IEnumerable expressions) { + Contract.Requires(expressions != null); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1030,8 +1233,11 @@ public static BlockExpression Block(IEnumerable expressions) // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(params Expression[] expressions) { + Contract.Requires(expressions != null); + Contract.Requires(expressions.Length >= 1); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1049,8 +1255,11 @@ public static BlockExpression Block(params Expression[] expressions) // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(Expression arg0, Expression arg1) { + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1068,8 +1277,10 @@ public static BlockExpression Block(Expression arg0, Expression arg1) // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(IEnumerable variables, IEnumerable expressions) { + Contract.Requires(expressions != null); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1087,8 +1298,11 @@ public static BlockExpression Block(IEnumerable variables, // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(IEnumerable variables, params Expression[] expressions) { + Contract.Requires(expressions != null); + Contract.Requires(expressions.Length >= 1); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1106,8 +1320,11 @@ public static BlockExpression Block(IEnumerable variables, // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(Type type, IEnumerable expressions) { + Contract.Requires(type != null); + Contract.Requires(expressions != null); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1125,8 +1342,12 @@ public static BlockExpression Block(Type type, IEnumerable expressio // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(Type type, params Expression[] expressions) { + Contract.Requires(type != null); + Contract.Requires(expressions != null); + Contract.Requires(expressions.Length >= 1); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1147,8 +1368,12 @@ public static BlockExpression Block(Type type, params Expression[] expressions) // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(Expression arg0, Expression arg1, Expression arg2) { + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1169,8 +1394,11 @@ public static BlockExpression Block(Expression arg0, Expression arg1, Expression // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(Type type, IEnumerable variables, IEnumerable expressions) { + Contract.Requires(type != null); + Contract.Requires(expressions != null); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1191,8 +1419,12 @@ public static BlockExpression Block(Type type, IEnumerable // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(Type type, IEnumerable variables, params Expression[] expressions) { + Contract.Requires(type != null); + Contract.Requires(expressions != null); + Contract.Requires(expressions.Length >= 1); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1216,8 +1448,13 @@ public static BlockExpression Block(Type type, IEnumerable // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(Expression arg0, Expression arg1, Expression arg2, Expression arg3) { + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); + Contract.Requires(arg3 != null); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } @@ -1244,12 +1481,120 @@ public static BlockExpression Block(Expression arg0, Expression arg1, Expression // // Returns: // The created System.Linq.Expressions.BlockExpression. + [Pure] public static BlockExpression Block(Expression arg0, Expression arg1, Expression arg2, Expression arg3, Expression arg4) { + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); + Contract.Requires(arg3 != null); + Contract.Requires(arg4 != null); Contract.Ensures(Contract.Result() != null); return default(BlockExpression); } #endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a break statement. + // + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Break, the System.Linq.Expressions.GotoExpression.Target property set + // to target, and a null value to be passed to the target label upon jumping. + [Pure] + public static GotoExpression Break(LabelTarget target) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a break statement + // with the specified type. + // + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // type: + // An System.Type to set the System.Linq.Expressions.Expression.Type property equal + // to. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Break, the System.Linq.Expressions.GotoExpression.Target property set + // to target, and the System.Linq.Expressions.Expression.Type property set to type. + [Pure] + public static GotoExpression Break(LabelTarget target, Type type) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a break statement. + // The value passed to the label upon jumping can be specified. + // + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // value: + // The value that will be passed to the associated label upon jumping. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Break, the System.Linq.Expressions.GotoExpression.Target property set + // to target, and value to be passed to the target label upon jumping. + [Pure] + public static GotoExpression Break(LabelTarget target, Expression value) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a break statement + // with the specified type. The value passed to the label upon jumping can be specified. + // + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // value: + // The value that will be passed to the associated label upon jumping. + // + // type: + // An System.Type to set the System.Linq.Expressions.Expression.Type property equal + // to. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Break, the System.Linq.Expressions.GotoExpression.Target property set + // to target, the System.Linq.Expressions.Expression.Type property set to type, + // and value to be passed to the target label upon jumping. + [Pure] + public static GotoExpression Break(LabelTarget target, Expression value, Type type) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } +#endif + // // Summary: // Creates a System.Linq.Expressions.MethodCallExpression that represents a @@ -1499,386 +1844,448 @@ public static MethodCallExpression Call(Type type, string methodName, Type[] typ Contract.Ensures(Contract.Result() != null); return default(MethodCallExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a coalescing - // operation. + // Creates a System.Linq.Expressions.MethodCallExpression that represents a call + // to a static (Shared in Visual Basic) method. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. + // method: + // The System.Reflection.MethodInfo that represents the target method. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // arguments: + // A collection of System.Linq.Expressions.Expression that represents the call arguments. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Coalesce and the - // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right - // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.InvalidOperationException: - // The System.Linq.Expressions.Expression.Type property of left does not represent - // a reference type or a nullable value type. - // - // System.ArgumentException: - // left.Type and right.Type are not convertible to each other. + // A System.Linq.Expressions.MethodCallExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Call and the System.Linq.Expressions.MethodCallExpression.Object + // and System.Linq.Expressions.MethodCallExpression.Method properties set to the + // specified values. [Pure] - public static BinaryExpression Coalesce(Expression left, Expression right) + public static MethodCallExpression Call(MethodInfo method, IEnumerable arguments) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(method != null); + Contract.Ensures(Contract.Result() != null); + return default(MethodCallExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a coalescing - // operation, given a conversion function. + // Creates a System.Linq.Expressions.MethodCallExpression that represents a call + // to a static (Shared in Visual Basic) method that takes one argument. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. - // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.MethodCallExpression.Method // property equal to. // - // conversion: - // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion - // property equal to. + // arg0: + // The System.Linq.Expressions.Expression that represents the first argument. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Coalesce and the - // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right - // and System.Linq.Expressions.BinaryExpression.Conversion properties set to - // the specified values. + // A System.Linq.Expressions.MethodCallExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Call and the System.Linq.Expressions.MethodCallExpression.Object + // and System.Linq.Expressions.MethodCallExpression.Method properties set to the + // specified values. // // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.ArgumentException: - // left.Type and right.Type are not convertible to each other. -or- conversion - // is not null and conversion.Type is a delegate type that does not take exactly - // one argument. - // - // System.InvalidOperationException: - // The System.Linq.Expressions.Expression.Type property of left does not represent - // a reference type or a nullable value type. -or- The System.Linq.Expressions.Expression.Type - // property of left represents a type that is not assignable to the parameter - // type of the delegate type conversion.Type. -or- The System.Linq.Expressions.Expression.Type - // property of right is not equal to the return type of the delegate type conversion.Type. + // T:System.ArgumentNullException: + // method is null. [Pure] - public static BinaryExpression Coalesce(Expression left, Expression right, LambdaExpression conversion) + public static MethodCallExpression Call(MethodInfo method, Expression arg0) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(method != null); + Contract.Requires(arg0 != null); + Contract.Ensures(Contract.Result() != null); + return default(MethodCallExpression); } - // // Summary: - // Creates a System.Linq.Expressions.ConditionalExpression. + // Creates a System.Linq.Expressions.MethodCallExpression that represents a call + // to a static method that takes two arguments. // // Parameters: - // test: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.Test + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.MethodCallExpression.Method // property equal to. // - // ifTrue: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.IfTrue - // property equal to. + // arg0: + // The System.Linq.Expressions.Expression that represents the first argument. // - // ifFalse: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.IfFalse - // property equal to. + // arg1: + // The System.Linq.Expressions.Expression that represents the second argument. // // Returns: - // A System.Linq.Expressions.ConditionalExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Conditional and - // the System.Linq.Expressions.ConditionalExpression.Test, System.Linq.Expressions.ConditionalExpression.IfTrue, - // and System.Linq.Expressions.ConditionalExpression.IfFalse properties set - // to the specified values. + // A System.Linq.Expressions.MethodCallExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Call and the System.Linq.Expressions.MethodCallExpression.Object + // and System.Linq.Expressions.MethodCallExpression.Method properties set to the + // specified values. // // Exceptions: - // System.ArgumentNullException: - // test or ifTrue or ifFalse is null. - // - // System.ArgumentException: - // test.Type is not System.Boolean. -or- ifTrue.Type is not equal to ifFalse.Type. + // T:System.ArgumentNullException: + // method is null. [Pure] - public static ConditionalExpression Condition(Expression test, Expression ifTrue, Expression ifFalse) + public static MethodCallExpression Call(MethodInfo method, Expression arg0, Expression arg1) { - Contract.Requires(test != null); - Contract.Requires(ifTrue != null); - Contract.Requires(ifFalse != null); - Contract.Ensures(Contract.Result() != null); - return default(ConditionalExpression); + Contract.Requires(method != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Ensures(Contract.Result() != null); + return default(MethodCallExpression); } // // Summary: - // Creates a System.Linq.Expressions.ConstantExpression that has the System.Linq.Expressions.ConstantExpression.Value - // property set to the specified value. + // Creates a System.Linq.Expressions.MethodCallExpression that represents a call + // to a method that takes two arguments. // // Parameters: - // value: - // An System.Object to set the System.Linq.Expressions.ConstantExpression.Value - // property equal to. + // instance: + // An System.Linq.Expressions.Expression that specifies the instance for an instance + // call. (pass null for a static (Shared in Visual Basic) method). + // + // method: + // The System.Reflection.MethodInfo that represents the target method. + // + // arg0: + // The System.Linq.Expressions.Expression that represents the first argument. + // + // arg1: + // The System.Linq.Expressions.Expression that represents the second argument. // // Returns: - // A System.Linq.Expressions.ConstantExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Constant and the - // System.Linq.Expressions.ConstantExpression.Value property set to the specified - // value. + // A System.Linq.Expressions.MethodCallExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Call and the System.Linq.Expressions.MethodCallExpression.Object + // and System.Linq.Expressions.MethodCallExpression.Method properties set to the + // specified values. [Pure] - public static ConstantExpression Constant(object value) + public static MethodCallExpression Call(Expression instance, MethodInfo method, Expression arg0, Expression arg1) { - Contract.Ensures(Contract.Result() != null); - return default(ConstantExpression); + Contract.Requires(method != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Ensures(Contract.Result() != null); + return default(MethodCallExpression); } // // Summary: - // Creates a System.Linq.Expressions.ConstantExpression that has the System.Linq.Expressions.ConstantExpression.Value - // and System.Linq.Expressions.Expression.Type properties set to the specified - // values. + // Creates a System.Linq.Expressions.MethodCallExpression that represents a call + // to a static method that takes three arguments. // // Parameters: - // value: - // An System.Object to set the System.Linq.Expressions.ConstantExpression.Value + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.MethodCallExpression.Method // property equal to. // - // type: - // A System.Type to set the System.Linq.Expressions.Expression.Type property - // equal to. + // arg0: + // The System.Linq.Expressions.Expression that represents the first argument. + // + // arg1: + // The System.Linq.Expressions.Expression that represents the second argument. + // + // arg2: + // The System.Linq.Expressions.Expression that represents the third argument. // // Returns: - // A System.Linq.Expressions.ConstantExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Constant and the - // System.Linq.Expressions.ConstantExpression.Value and System.Linq.Expressions.Expression.Type - // properties set to the specified values. + // A System.Linq.Expressions.MethodCallExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Call and the System.Linq.Expressions.MethodCallExpression.Object + // and System.Linq.Expressions.MethodCallExpression.Method properties set to the + // specified values. // // Exceptions: - // System.ArgumentNullException: - // type is null. - // - // System.ArgumentException: - // value is not null and type is not assignable from the dynamic type of value. + // T:System.ArgumentNullException: + // method is null. [Pure] - public static ConstantExpression Constant(object value, Type type) + public static MethodCallExpression Call(MethodInfo method, Expression arg0, Expression arg1, Expression arg2) { - Contract.Requires(type != null); - Contract.Ensures(Contract.Result() != null); - return default(ConstantExpression); + Contract.Requires(method != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); + Contract.Ensures(Contract.Result() != null); + return default(MethodCallExpression); } // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents a conversion - // operation. + // Creates a System.Linq.Expressions.MethodCallExpression that represents a call + // to a method that takes three arguments. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand - // property equal to. + // instance: + // An System.Linq.Expressions.Expression that specifies the instance for an instance + // call. (pass null for a static (Shared in Visual Basic) method). // - // type: - // A System.Type to set the System.Linq.Expressions.Expression.Type property - // equal to. + // method: + // The System.Reflection.MethodInfo that represents the target method. // - // Returns: - // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Convert and the - // System.Linq.Expressions.UnaryExpression.Operand and System.Linq.Expressions.Expression.Type - // properties set to the specified values. + // arg0: + // The System.Linq.Expressions.Expression that represents the first argument. // - // Exceptions: - // System.ArgumentNullException: - // expression or type is null. + // arg1: + // The System.Linq.Expressions.Expression that represents the second argument. // - // System.InvalidOperationException: - // No conversion operator is defined between expression.Type and type. + // arg2: + // The System.Linq.Expressions.Expression that represents the third argument. + // + // Returns: + // A System.Linq.Expressions.MethodCallExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Call and the System.Linq.Expressions.MethodCallExpression.Object + // and System.Linq.Expressions.MethodCallExpression.Method properties set to the + // specified values. [Pure] - public static UnaryExpression Convert(Expression expression, Type type) + public static MethodCallExpression Call(Expression instance, MethodInfo method, Expression arg0, Expression arg1, Expression arg2) { - Contract.Requires(expression != null); - Contract.Requires(type != null); - Contract.Ensures(Contract.Result() != null); - return default(UnaryExpression); + Contract.Requires(method != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); + Contract.Ensures(Contract.Result() != null); + return default(MethodCallExpression); } // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents a conversion - // operation for which the implementing method is specified. + // Creates a System.Linq.Expressions.MethodCallExpression that represents a call + // to a static method that takes four arguments. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.MethodCallExpression.Method // property equal to. // - // type: - // A System.Type to set the System.Linq.Expressions.Expression.Type property - // equal to. + // arg0: + // The System.Linq.Expressions.Expression that represents the first argument. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.UnaryExpression.Method - // property equal to. + // arg1: + // The System.Linq.Expressions.Expression that represents the second argument. + // + // arg2: + // The System.Linq.Expressions.Expression that represents the third argument. + // + // arg3: + // The System.Linq.Expressions.Expression that represents the fourth argument. // // Returns: - // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Convert and the - // System.Linq.Expressions.UnaryExpression.Operand, System.Linq.Expressions.Expression.Type, - // and System.Linq.Expressions.UnaryExpression.Method properties set to the + // A System.Linq.Expressions.MethodCallExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Call and the System.Linq.Expressions.MethodCallExpression.Object + // and System.Linq.Expressions.MethodCallExpression.Method properties set to the // specified values. // // Exceptions: - // System.ArgumentNullException: - // expression or type is null. - // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly one argument. - // - // System.Reflection.AmbiguousMatchException: - // More than one method that matches the method description was found. - // - // System.InvalidOperationException: - // No conversion operator is defined between expression.Type and type. -or- - // expression.Type is not assignable to the argument type of the method represented - // by method. -or- The return type of the method represented by method is not - // assignable to type. -or- expression.Type or type is a nullable value type - // and the corresponding non-nullable value type does not equal the argument - // type or the return type, respectively, of the method represented by method. + // T:System.ArgumentNullException: + // method is null. [Pure] - public static UnaryExpression Convert(Expression expression, Type type, MethodInfo method) + public static MethodCallExpression Call(MethodInfo method, Expression arg0, Expression arg1, Expression arg2, Expression arg3) { - Contract.Requires(expression != null); - Contract.Requires(type != null); - Contract.Ensures(Contract.Result() != null); - return default(UnaryExpression); + Contract.Requires(method != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); + Contract.Requires(arg3 != null); + Contract.Ensures(Contract.Result() != null); + return default(MethodCallExpression); } // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents a conversion - // operation that throws an exception if the target type is overflowed. + // Creates a System.Linq.Expressions.MethodCallExpression that represents a call + // to a static method that takes five arguments. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.MethodCallExpression.Method // property equal to. // - // type: - // A System.Type to set the System.Linq.Expressions.Expression.Type property - // equal to. + // arg0: + // The System.Linq.Expressions.Expression that represents the first argument. // - // Returns: - // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.ConvertChecked and - // the System.Linq.Expressions.UnaryExpression.Operand and System.Linq.Expressions.Expression.Type - // properties set to the specified values. + // arg1: + // The System.Linq.Expressions.Expression that represents the second argument. + // + // arg2: + // The System.Linq.Expressions.Expression that represents the third argument. + // + // arg3: + // The System.Linq.Expressions.Expression that represents the fourth argument. + // + // arg4: + // The System.Linq.Expressions.Expression that represents the fifth argument. + // + // Returns: + // A System.Linq.Expressions.MethodCallExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Call and the System.Linq.Expressions.MethodCallExpression.Object + // and System.Linq.Expressions.MethodCallExpression.Method properties set to the + // specified values. // // Exceptions: - // System.ArgumentNullException: - // expression or type is null. + // T:System.ArgumentNullException: + // method is null. + [Pure] + public static MethodCallExpression Call(MethodInfo method, Expression arg0, Expression arg1, Expression arg2, Expression arg3, Expression arg4) + { + Contract.Requires(method != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); + Contract.Requires(arg3 != null); + Contract.Requires(arg4 != null); + Contract.Ensures(Contract.Result() != null); + return default(MethodCallExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // - // System.InvalidOperationException: - // No conversion operator is defined between expression.Type and type. + // Summary: + // Creates a System.Linq.Expressions.CatchBlock representing a catch statement with + // a reference to the caught System.Exception object for use in the handler body. + // + // Parameters: + // variable: + // A System.Linq.Expressions.ParameterExpression representing a reference to the + // System.Exception object caught by this handler. + // + // body: + // The body of the catch statement. + // + // Returns: + // The created System.Linq.Expressions.CatchBlock. [Pure] - public static UnaryExpression ConvertChecked(Expression expression, Type type) + public static CatchBlock Catch(ParameterExpression variable, Expression body) + { + Contract.Requires(variable != null); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(CatchBlock); + } + // + // Summary: + // Creates a System.Linq.Expressions.CatchBlock representing a catch statement. + // + // Parameters: + // type: + // The System.Linq.Expressions.Expression.Type of System.Exception this System.Linq.Expressions.CatchBlock + // will handle. + // + // body: + // The body of the catch statement. + // + // Returns: + // The created System.Linq.Expressions.CatchBlock. + [Pure] + public static CatchBlock Catch(Type type, Expression body) { - Contract.Requires(expression != null); Contract.Requires(type != null); - Contract.Ensures(Contract.Result() != null); - return default(UnaryExpression); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(CatchBlock); } // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents a conversion - // operation that throws an exception if the target type is overflowed and for - // which the implementing method is specified. + // Creates a System.Linq.Expressions.CatchBlock representing a catch statement with + // an System.Exception filter and a reference to the caught System.Exception object. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand - // property equal to. + // variable: + // A System.Linq.Expressions.ParameterExpression representing a reference to the + // System.Exception object caught by this handler. // - // type: - // A System.Type to set the System.Linq.Expressions.Expression.Type property - // equal to. + // body: + // The body of the catch statement. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.UnaryExpression.Method - // property equal to. + // filter: + // The body of the System.Exception filter. // // Returns: - // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.ConvertChecked and - // the System.Linq.Expressions.UnaryExpression.Operand, System.Linq.Expressions.Expression.Type, - // and System.Linq.Expressions.UnaryExpression.Method properties set to the - // specified values. + // The created System.Linq.Expressions.CatchBlock. + [Pure] + public static CatchBlock Catch(ParameterExpression variable, Expression body, Expression filter) + { + Contract.Requires(variable != null); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(CatchBlock); + } // - // Exceptions: - // System.ArgumentNullException: - // expression or type is null. + // Summary: + // Creates a System.Linq.Expressions.CatchBlock representing a catch statement with + // an System.Exception filter but no reference to the caught System.Exception object. // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly one argument. + // Parameters: + // type: + // The System.Linq.Expressions.Expression.Type of System.Exception this System.Linq.Expressions.CatchBlock + // will handle. // - // System.Reflection.AmbiguousMatchException: - // More than one method that matches the method description was found. + // body: + // The body of the catch statement. // - // System.InvalidOperationException: - // No conversion operator is defined between expression.Type and type. -or- - // expression.Type is not assignable to the argument type of the method represented - // by method. -or- The return type of the method represented by method is not - // assignable to type. -or- expression.Type or type is a nullable value type - // and the corresponding non-nullable value type does not equal the argument - // type or the return type, respectively, of the method represented by method. + // filter: + // The body of the System.Exception filter. + // + // Returns: + // The created System.Linq.Expressions.CatchBlock. [Pure] - public static UnaryExpression ConvertChecked(Expression expression, Type type, MethodInfo method) + public static CatchBlock Catch(Type type, Expression body, Expression filter) { - Contract.Requires(expression != null); Contract.Requires(type != null); - Contract.Ensures(Contract.Result() != null); - return default(UnaryExpression); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(CatchBlock); } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // division operation. + // Creates a System.Linq.Expressions.DebugInfoExpression for clearing a sequence + // point. + // + // Parameters: + // document: + // The System.Linq.Expressions.SymbolDocumentInfo that represents the source file. + // + // Returns: + // An instance of System.Linq.Expressions.DebugInfoExpression for clearing a sequence + // point. + [Pure] + public static DebugInfoExpression ClearDebugInfo(SymbolDocumentInfo document) + { + Contract.Requires(document != null); + Contract.Ensures(Contract.Result() != null); + return default(DebugInfoExpression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a coalescing + // operation. // // Parameters: // left: // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property to. + // property equal to. // // right: // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property to. + // property equal to. // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Divide and the System.Linq.Expressions.BinaryExpression.Left - // and System.Linq.Expressions.BinaryExpression.Right properties set to the - // specified values. + // property equal to System.Linq.Expressions.ExpressionType.Coalesce and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: // left or right is null. // // System.InvalidOperationException: - // The division operator is not defined for left.Type and right.Type. + // The System.Linq.Expressions.Expression.Type property of left does not represent + // a reference type or a nullable value type. + // + // System.ArgumentException: + // left.Type and right.Type are not convertible to each other. [Pure] - public static BinaryExpression Divide(Expression left, Expression right) + public static BinaryExpression Coalesce(Expression left, Expression right) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -1887,8 +2294,8 @@ public static BinaryExpression Divide(Expression left, Expression right) } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // division operation. The implementing method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents a coalescing + // operation, given a conversion function. // // Parameters: // left: @@ -1899,424 +2306,533 @@ public static BinaryExpression Divide(Expression left, Expression right) // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion // property equal to. // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Divide and the System.Linq.Expressions.BinaryExpression.Left, - // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method - // properties set to the specified values. + // property equal to System.Linq.Expressions.ExpressionType.Coalesce and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right + // and System.Linq.Expressions.BinaryExpression.Conversion properties set to + // the specified values. // // Exceptions: // System.ArgumentNullException: // left or right is null. // // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. + // left.Type and right.Type are not convertible to each other. -or- conversion + // is not null and conversion.Type is a delegate type that does not take exactly + // one argument. // // System.InvalidOperationException: - // method is null and the division operator is not defined for left.Type and - // right.Type. + // The System.Linq.Expressions.Expression.Type property of left does not represent + // a reference type or a nullable value type. -or- The System.Linq.Expressions.Expression.Type + // property of left represents a type that is not assignable to the parameter + // type of the delegate type conversion.Type. -or- The System.Linq.Expressions.Expression.Type + // property of right is not equal to the return type of the delegate type conversion.Type. [Pure] - public static BinaryExpression Divide(Expression left, Expression right, MethodInfo method) + public static BinaryExpression Coalesce(Expression left, Expression right, LambdaExpression conversion) { Contract.Requires(left != null); Contract.Requires(right != null); Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } + // // Summary: - // Creates an System.Linq.Expressions.ElementInit, given an System.Collections.Generic.IEnumerable - // as the second argument. + // Creates a System.Linq.Expressions.ConditionalExpression. // // Parameters: - // addMethod: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.ElementInit.AddMethod + // test: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.Test // property equal to. // - // arguments: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression - // objects to set the System.Linq.Expressions.ElementInit.Arguments property - // equal to. + // ifTrue: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.IfTrue + // property equal to. + // + // ifFalse: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.IfFalse + // property equal to. // // Returns: - // An System.Linq.Expressions.ElementInit that has the System.Linq.Expressions.ElementInit.AddMethod - // and System.Linq.Expressions.ElementInit.Arguments properties set to the specified - // values. + // A System.Linq.Expressions.ConditionalExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Conditional and + // the System.Linq.Expressions.ConditionalExpression.Test, System.Linq.Expressions.ConditionalExpression.IfTrue, + // and System.Linq.Expressions.ConditionalExpression.IfFalse properties set + // to the specified values. // // Exceptions: // System.ArgumentNullException: - // addMethod or arguments is null. + // test or ifTrue or ifFalse is null. // // System.ArgumentException: - // The method that addMethod represents is not named "Add" (case insensitive). - // -or- The method that addMethod represents is not an instance method. -or- - // arguments does not contain the same number of elements as the number of parameters - // for the method that addMethod represents. -or- The System.Linq.Expressions.Expression.Type - // property of one or more elements of arguments is not assignable to the type - // of the corresponding parameter of the method that addMethod represents. + // test.Type is not System.Boolean. -or- ifTrue.Type is not equal to ifFalse.Type. [Pure] - public static ElementInit ElementInit(MethodInfo addMethod, IEnumerable arguments) + public static ConditionalExpression Condition(Expression test, Expression ifTrue, Expression ifFalse) { - Contract.Requires(addMethod != null); - Contract.Requires(arguments != null); - Contract.Ensures(Contract.Result() != null); - return default(ElementInit); + Contract.Requires(test != null); + Contract.Requires(ifTrue != null); + Contract.Requires(ifFalse != null); + Contract.Ensures(Contract.Result() != null); + return default(ConditionalExpression); } +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates an System.Linq.Expressions.ElementInit, given an array of values - // as the second argument. + // Creates a System.Linq.Expressions.ConditionalExpression that represents a conditional + // statement. // // Parameters: - // addMethod: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.ElementInit.AddMethod + // test: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.Test // property equal to. // - // arguments: - // An array of System.Linq.Expressions.Expression objects to set the System.Linq.Expressions.ElementInit.Arguments + // ifTrue: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.IfTrue // property equal to. // - // Returns: - // An System.Linq.Expressions.ElementInit that has the System.Linq.Expressions.ElementInit.AddMethod - // and System.Linq.Expressions.ElementInit.Arguments properties set to the specified - // values. + // ifFalse: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.IfFalse + // property equal to. // - // Exceptions: - // System.ArgumentNullException: - // addMethod or arguments is null. + // type: + // A System.Linq.Expressions.Expression.Type to set the System.Linq.Expressions.Expression.Type + // property equal to. // - // System.ArgumentException: - // The method that addMethod represents is not named "Add" (case insensitive). - // -or- The method that addMethod represents is not an instance method. -or- - // arguments does not contain the same number of elements as the number of parameters - // for the method that addMethod represents. -or- The System.Linq.Expressions.Expression.Type - // property of one or more elements of arguments is not assignable to the type - // of the corresponding parameter of the method that addMethod represents. + // Returns: + // A System.Linq.Expressions.ConditionalExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Conditional and the + // System.Linq.Expressions.ConditionalExpression.Test, System.Linq.Expressions.ConditionalExpression.IfTrue, + // and System.Linq.Expressions.ConditionalExpression.IfFalse properties set to the + // specified values. [Pure] - public static ElementInit ElementInit(MethodInfo addMethod, params Expression[] arguments) + public static ConditionalExpression Condition(Expression test, Expression ifTrue, Expression ifFalse, Type type) { - Contract.Requires(addMethod != null); - Contract.Requires(arguments != null); - Contract.Ensures(Contract.Result() != null); - return default(ElementInit); + Contract.Requires(test != null); + Contract.Requires(ifTrue != null); + Contract.Requires(ifFalse != null); + Contract.Ensures(Contract.Result() != null); + return default(ConditionalExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an equality - // comparison. + // Creates a System.Linq.Expressions.ConstantExpression that has the System.Linq.Expressions.ConstantExpression.Value + // property set to the specified value. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // value: + // An System.Object to set the System.Linq.Expressions.ConstantExpression.Value // property equal to. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // Returns: + // A System.Linq.Expressions.ConstantExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Constant and the + // System.Linq.Expressions.ConstantExpression.Value property set to the specified + // value. + [Pure] + public static ConstantExpression Constant(object value) + { + Contract.Ensures(Contract.Result() != null); + return default(ConstantExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.ConstantExpression that has the System.Linq.Expressions.ConstantExpression.Value + // and System.Linq.Expressions.Expression.Type properties set to the specified + // values. + // + // Parameters: + // value: + // An System.Object to set the System.Linq.Expressions.ConstantExpression.Value // property equal to. // + // type: + // A System.Type to set the System.Linq.Expressions.Expression.Type property + // equal to. + // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Equal and the System.Linq.Expressions.BinaryExpression.Left - // and System.Linq.Expressions.BinaryExpression.Right properties set to the - // specified values. + // A System.Linq.Expressions.ConstantExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Constant and the + // System.Linq.Expressions.ConstantExpression.Value and System.Linq.Expressions.Expression.Type + // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: - // left or right is null. + // type is null. // - // System.InvalidOperationException: - // The equality operator is not defined for left.Type and right.Type. + // System.ArgumentException: + // value is not null and type is not assignable from the dynamic type of value. [Pure] - public static BinaryExpression Equal(Expression left, Expression right) + public static ConstantExpression Constant(object value, Type type) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(ConstantExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an equality - // comparison. The implementing method can be specified. + // Creates a System.Linq.Expressions.GotoExpression representing a continue statement. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. - // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. - // - // liftToNull: - // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; - // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. - // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method - // property equal to. + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Equal and the System.Linq.Expressions.BinaryExpression.Left, - // System.Linq.Expressions.BinaryExpression.Right, System.Linq.Expressions.BinaryExpression.IsLiftedToNull, - // and System.Linq.Expressions.BinaryExpression.Method properties set to the - // specified values. + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Continue, the System.Linq.Expressions.GotoExpression.Target property + // set to target, and a null value to be passed to the target label upon jumping. + [Pure] + public static GotoExpression Continue(LabelTarget target) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a continue statement + // with the specified type. // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. // - // System.InvalidOperationException: - // method is null and the equality operator is not defined for left.Type and - // right.Type. + // type: + // An System.Type to set the System.Linq.Expressions.Expression.Type property equal + // to. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Continue, the System.Linq.Expressions.GotoExpression.Target property + // set to target, the System.Linq.Expressions.Expression.Type property set to type, + // and a null value to be passed to the target label upon jumping. [Pure] - public static BinaryExpression Equal(Expression left, Expression right, bool liftToNull, MethodInfo method) + public static GotoExpression Continue(LabelTarget target, Type type) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise - // XOR operation. + // Creates a System.Linq.Expressions.UnaryExpression that represents a conversion + // operation. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand // property equal to. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // type: + // A System.Type to set the System.Linq.Expressions.Expression.Type property + // equal to. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.ExclusiveOr and - // the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Convert and the + // System.Linq.Expressions.UnaryExpression.Operand and System.Linq.Expressions.Expression.Type // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: - // left or right is null. + // expression or type is null. // // System.InvalidOperationException: - // The XOR operator is not defined for left.Type and right.Type. + // No conversion operator is defined between expression.Type and type. [Pure] - public static BinaryExpression ExclusiveOr(Expression left, Expression right) + public static UnaryExpression Convert(Expression expression, Type type) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(expression != null); + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise - // XOR operation. The implementing method can be specified. + // Creates a System.Linq.Expressions.UnaryExpression that represents a conversion + // operation for which the implementing method is specified. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand // property equal to. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // type: + // A System.Type to set the System.Linq.Expressions.Expression.Type property + // equal to. // // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.UnaryExpression.Method // property equal to. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.ExclusiveOr and - // the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // and System.Linq.Expressions.BinaryExpression.Method properties set to the + // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Convert and the + // System.Linq.Expressions.UnaryExpression.Operand, System.Linq.Expressions.Expression.Type, + // and System.Linq.Expressions.UnaryExpression.Method properties set to the // specified values. // // Exceptions: // System.ArgumentNullException: - // left or right is null. + // expression or type is null. // // System.ArgumentException: // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. + // (Shared in Visual Basic), or does not take exactly one argument. + // + // System.Reflection.AmbiguousMatchException: + // More than one method that matches the method description was found. // // System.InvalidOperationException: - // method is null and the XOR operator is not defined for left.Type and right.Type. + // No conversion operator is defined between expression.Type and type. -or- + // expression.Type is not assignable to the argument type of the method represented + // by method. -or- The return type of the method represented by method is not + // assignable to type. -or- expression.Type or type is a nullable value type + // and the corresponding non-nullable value type does not equal the argument + // type or the return type, respectively, of the method represented by method. [Pure] - public static BinaryExpression ExclusiveOr(Expression left, Expression right, MethodInfo method) + public static UnaryExpression Convert(Expression expression, Type type, MethodInfo method) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(expression != null); + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.MemberExpression that represents accessing - // a field. + // Creates a System.Linq.Expressions.UnaryExpression that represents a conversion + // operation that throws an exception if the target type is overflowed. // // Parameters: // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.MemberExpression.Expression + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand // property equal to. // - // field: - // The System.Reflection.FieldInfo to set the System.Linq.Expressions.MemberExpression.Member - // property equal to. + // type: + // A System.Type to set the System.Linq.Expressions.Expression.Type property + // equal to. // // Returns: - // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.MemberAccess and - // the System.Linq.Expressions.MemberExpression.Expression and System.Linq.Expressions.MemberExpression.Member + // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ConvertChecked and + // the System.Linq.Expressions.UnaryExpression.Operand and System.Linq.Expressions.Expression.Type // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: - // field is null. -or- The field represented by field is not static (Shared - // in Visual Basic) and expression is null. + // expression or type is null. // - // System.ArgumentException: - // expression.Type is not assignable to the declaring type of the field represented - // by field. + // System.InvalidOperationException: + // No conversion operator is defined between expression.Type and type. [Pure] - public static MemberExpression Field(Expression expression, FieldInfo field) + public static UnaryExpression ConvertChecked(Expression expression, Type type) { - Contract.Requires(field != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberExpression); + Contract.Requires(expression != null); + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.MemberExpression that represents accessing - // a field given the name of the field. + // Creates a System.Linq.Expressions.UnaryExpression that represents a conversion + // operation that throws an exception if the target type is overflowed and for + // which the implementing method is specified. // // Parameters: // expression: - // An System.Linq.Expressions.Expression whose System.Linq.Expressions.Expression.Type - // contains a field named fieldName. + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // property equal to. // - // fieldName: - // The name of a field. + // type: + // A System.Type to set the System.Linq.Expressions.Expression.Type property + // equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.UnaryExpression.Method + // property equal to. // // Returns: - // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.MemberAccess, the - // System.Linq.Expressions.MemberExpression.Expression property set to expression, - // and the System.Linq.Expressions.MemberExpression.Member property set to the - // System.Reflection.FieldInfo that represents the field denoted by fieldName. + // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ConvertChecked and + // the System.Linq.Expressions.UnaryExpression.Operand, System.Linq.Expressions.Expression.Type, + // and System.Linq.Expressions.UnaryExpression.Method properties set to the + // specified values. // // Exceptions: // System.ArgumentNullException: - // expression or fieldName is null. + // expression or type is null. // // System.ArgumentException: - // No field named fieldName is defined in expression.Type or its base types. - [Pure] - public static MemberExpression Field(Expression expression, string fieldName) + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly one argument. + // + // System.Reflection.AmbiguousMatchException: + // More than one method that matches the method description was found. + // + // System.InvalidOperationException: + // No conversion operator is defined between expression.Type and type. -or- + // expression.Type is not assignable to the argument type of the method represented + // by method. -or- The return type of the method represented by method is not + // assignable to type. -or- expression.Type or type is a nullable value type + // and the corresponding non-nullable value type does not equal the argument + // type or the return type, respectively, of the method represented by method. + [Pure] + public static UnaryExpression ConvertChecked(Expression expression, Type type, MethodInfo method) { - Contract.Requires(fieldName != null); Contract.Requires(expression != null); - - Contract.Ensures(Contract.Result() != null); - return default(MemberExpression); + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Type object that represents a generic System.Action delegate - // type that has specific type arguments. + // Creates a System.Linq.Expressions.DebugInfoExpression with the specified span. // // Parameters: - // typeArgs: - // An array of zero to four System.Type objects that specify the type arguments - // for the System.Action delegate type. + // document: + // The System.Linq.Expressions.SymbolDocumentInfo that represents the source file. + // + // startLine: + // The start line of this System.Linq.Expressions.DebugInfoExpression. Must be greater + // than 0. + // + // startColumn: + // The start column of this System.Linq.Expressions.DebugInfoExpression. Must be + // greater than 0. + // + // endLine: + // The end line of this System.Linq.Expressions.DebugInfoExpression. Must be greater + // or equal than the start line. + // + // endColumn: + // The end column of this System.Linq.Expressions.DebugInfoExpression. If the end + // line is the same as the start line, it must be greater or equal than the start + // column. In any case, must be greater than 0. // // Returns: - // The type of a System.Action delegate that has the specified type arguments. + // An instance of System.Linq.Expressions.DebugInfoExpression. + [Pure] + public static DebugInfoExpression DebugInfo(SymbolDocumentInfo document, int startLine, int startColumn, int endLine, int endColumn) + { + Contract.Requires(document != null); + Contract.Requires(startLine >= 1); + Contract.Requires(startColumn >= 1); + Contract.Requires(endLine >= startLine); + Contract.Requires(endColumn >= 1); + Contract.Requires(endLine != startLine || endColumn >= startColumn); + Contract.Ensures(Contract.Result() != null); + return default(DebugInfoExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // - // Exceptions: - // System.ArgumentException: - // typeArgs contains more than four elements. + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents the decrementing + // of the expression by 1. // - // System.ArgumentNullException: - // typeArgs is null. + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to decrement. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that represents the decremented expression. [Pure] - public static Type GetActionType(params Type[] typeArgs) + public static UnaryExpression Decrement(Expression expression) { - Contract.Requires(typeArgs != null); - Contract.Requires(typeArgs.Length <= 4); - Contract.Ensures(Contract.Result() != null); - return default(Type); + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); } // // Summary: - // Creates a System.Type object that represents a generic System.Func delegate - // type that has specific type arguments. + // Creates a System.Linq.Expressions.UnaryExpression that represents the decrementing + // of the expression by 1. // // Parameters: - // typeArgs: - // An array of one to five System.Type objects that specify the type arguments - // for the System.Func delegate type. + // expression: + // An System.Linq.Expressions.Expression to decrement. + // + // method: + // A System.Reflection.MethodInfo that represents the implementing method. // // Returns: - // The type of a System.Func delegate that has the specified type arguments. + // A System.Linq.Expressions.UnaryExpression that represents the decremented expression. + [Pure] + public static UnaryExpression Decrement(Expression expression, MethodInfo method) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // - // Exceptions: - // System.ArgumentException: - // typeArgs contains less than one or more than five elements. + // Summary: + // Creates a System.Linq.Expressions.DefaultExpression that has the System.Linq.Expressions.Expression.Type + // property set to the specified type. // - // System.ArgumentNullException: - // typeArgs is null. + // Parameters: + // type: + // A System.Type to set the System.Linq.Expressions.Expression.Type property equal + // to. + // + // Returns: + // A System.Linq.Expressions.DefaultExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Default and the System.Linq.Expressions.Expression.Type + // property set to the specified type. [Pure] - public static Type GetFuncType(params Type[] typeArgs) + public static DefaultExpression Default(Type type) { - Contract.Requires(typeArgs != null); - Contract.Requires(typeArgs.Length >= 1); - Contract.Requires(typeArgs.Length <= 5); - Contract.Ensures(Contract.Result() != null); - return default(Type); + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(DefaultExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a "greater - // than" numeric comparison. + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // division operation. // // Parameters: // left: // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. + // property to. // // right: // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // property to. // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.GreaterThan and - // the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right - // properties set to the specified values. + // property equal to System.Linq.Expressions.ExpressionType.Divide and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the + // specified values. // // Exceptions: // System.ArgumentNullException: // left or right is null. // // System.InvalidOperationException: - // The "greater than" operator is not defined for left.Type and right.Type. + // The division operator is not defined for left.Type and right.Type. [Pure] - public static BinaryExpression GreaterThan(Expression left, Expression right) + public static BinaryExpression Divide(Expression left, Expression right) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -2325,8 +2841,8 @@ public static BinaryExpression GreaterThan(Expression left, Expression right) } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a "greater - // than" numeric comparison. The implementing method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // division operation. The implementing method can be specified. // // Parameters: // left: @@ -2337,19 +2853,14 @@ public static BinaryExpression GreaterThan(Expression left, Expression right) // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // - // liftToNull: - // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; - // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. - // // method: // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method // property equal to. // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.GreaterThan and - // the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // System.Linq.Expressions.BinaryExpression.IsLiftedToNull, and System.Linq.Expressions.BinaryExpression.Method + // property equal to System.Linq.Expressions.ExpressionType.Divide and the System.Linq.Expressions.BinaryExpression.Left, + // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method // properties set to the specified values. // // Exceptions: @@ -2361,20 +2872,22 @@ public static BinaryExpression GreaterThan(Expression left, Expression right) // (Shared in Visual Basic), or does not take exactly two arguments. // // System.InvalidOperationException: - // method is null and the "greater than" operator is not defined for left.Type - // and right.Type. + // method is null and the division operator is not defined for left.Type and + // right.Type. [Pure] - public static BinaryExpression GreaterThan(Expression left, Expression right, bool liftToNull, MethodInfo method) + public static BinaryExpression Divide(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); Contract.Requires(right != null); Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a "greater - // than or equal" numeric comparison. + // Creates a System.Linq.Expressions.BinaryExpression that represents a division + // assignment operation that does not have overflow checking. // // Parameters: // left: @@ -2387,18 +2900,11 @@ public static BinaryExpression GreaterThan(Expression left, Expression right, bo // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.GreaterThanOrEqual - // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // property equal to System.Linq.Expressions.ExpressionType.DivideAssign and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.InvalidOperationException: - // The "greater than or equal" operator is not defined for left.Type and right.Type. [Pure] - public static BinaryExpression GreaterThanOrEqual(Expression left, Expression right) + public static BinaryExpression DivideAssign(Expression left, Expression right) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -2407,8 +2913,8 @@ public static BinaryExpression GreaterThanOrEqual(Expression left, Expression ri } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a "greater - // than or equal" numeric comparison. The implementing method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents a division + // assignment operation that does not have overflow checking. // // Parameters: // left: @@ -2419,34 +2925,18 @@ public static BinaryExpression GreaterThanOrEqual(Expression left, Expression ri // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // - // liftToNull: - // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; - // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. - // // method: // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method // property equal to. // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.GreaterThanOrEqual - // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // System.Linq.Expressions.BinaryExpression.IsLiftedToNull, and System.Linq.Expressions.BinaryExpression.Method - // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. - // - // System.InvalidOperationException: - // method is null and the "greater than or equal" operator is not defined for - // left.Type and right.Type. + // property equal to System.Linq.Expressions.ExpressionType.DivideAssign and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the specified + // values. [Pure] - public static BinaryExpression GreaterThanOrEqual(Expression left, Expression right, bool liftToNull, MethodInfo method) + public static BinaryExpression DivideAssign(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -2455,294 +2945,341 @@ public static BinaryExpression GreaterThanOrEqual(Expression left, Expression ri } // // Summary: - // Creates an System.Linq.Expressions.InvocationExpression. + // Creates a System.Linq.Expressions.BinaryExpression that represents a division + // assignment operation that does not have overflow checking. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.InvocationExpression.Expression + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // arguments: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression - // objects to use to populate the System.Linq.Expressions.InvocationExpression.Arguments - // collection. - // - // Returns: - // An System.Linq.Expressions.InvocationExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Invoke and the System.Linq.Expressions.InvocationExpression.Expression - // and System.Linq.Expressions.InvocationExpression.Arguments properties set - // to the specified values. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // - // Exceptions: - // System.ArgumentNullException: - // expression is null. + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. // - // System.ArgumentException: - // expression.Type does not represent a delegate type or an System.Linq.Expressions.Expression. - // -or- The System.Linq.Expressions.Expression.Type property of an element - // of arguments is not assignable to the type of the corresponding parameter - // of the delegate represented by expression. + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. // - // System.InvalidOperationException: - // arguments does not contain the same number of elements as the list of parameters - // for the delegate represented by expression. + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.DivideAssign and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion + // properties set to the specified values. [Pure] - public static InvocationExpression Invoke(Expression expression, IEnumerable arguments) + public static BinaryExpression DivideAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) { - Contract.Requires(expression != null); - Contract.Ensures(Contract.Result() != null); - return default(InvocationExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } +#endif + +#if NETFRAMEWORK_4_0 // // Summary: - // Creates an System.Linq.Expressions.InvocationExpression. + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.InvocationExpression.Expression - // property equal to. + // binder: + // The runtime binder for the dynamic operation. + // + // returnType: + // The result type of the dynamic expression. // // arguments: - // An array of System.Linq.Expressions.Expression objects to use to populate - // the System.Linq.Expressions.InvocationExpression.Arguments collection. + // The arguments to the dynamic operation. // // Returns: - // An System.Linq.Expressions.InvocationExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Invoke and the System.Linq.Expressions.InvocationExpression.Expression - // and System.Linq.Expressions.InvocationExpression.Arguments properties set - // to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // expression is null. - // - // System.ArgumentException: - // expression.Type does not represent a delegate type or an System.Linq.Expressions.Expression. - // -or- The System.Linq.Expressions.Expression.Type property of an element - // of arguments is not assignable to the type of the corresponding parameter - // of the delegate represented by expression. - // - // System.InvalidOperationException: - // arguments does not contain the same number of elements as the list of parameters - // for the delegate represented by expression. + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.Binder + // and System.Linq.Expressions.DynamicExpression.Arguments set to the specified + // values. [Pure] - public static InvocationExpression Invoke(Expression expression, params Expression[] arguments) + public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, IEnumerable arguments) { - Contract.Requires(expression != null); - Contract.Ensures(Contract.Result() != null); - return default(InvocationExpression); + Contract.Requires(binder != null); + Contract.Requires(returnType != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); } // // Summary: - // Creates an System.Linq.Expressions.Expression where the delegate - // type is known at compile time. + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder. // // Parameters: - // body: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body - // property equal to. + // binder: + // The runtime binder for the dynamic operation. // - // parameters: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.ParameterExpression - // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters - // collection. + // returnType: + // The result type of the dynamic expression. // - // Type parameters: - // TDelegate: - // A delegate type. + // arg0: + // The first argument to the dynamic operation. // // Returns: - // An System.Linq.Expressions.Expression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body - // and System.Linq.Expressions.LambdaExpression.Parameters properties set to - // the specified values. + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.Binder + // and System.Linq.Expressions.DynamicExpression.Arguments set to the specified + // values. + [Pure] + public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0) + { + Contract.Requires(binder != null); + Contract.Requires(returnType != null); + Contract.Requires(arg0 != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); + } // - // Exceptions: - // System.ArgumentNullException: - // body is null. -or- One or more elements in parameters are null. + // Summary: + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder. // - // System.ArgumentException: - // TDelegate is not a delegate type. -or- body.Type represents a type that - // is not assignable to the return type of TDelegate. -or- parameters does - // not contain the same number of elements as the list of parameters for TDelegate. - // -or- The System.Linq.Expressions.Expression.Type property of an element - // of parameters is not assignable from the type of the corresponding parameter - // type of TDelegate. + // Parameters: + // binder: + // The runtime binder for the dynamic operation. + // + // returnType: + // The result type of the dynamic expression. + // + // arguments: + // The arguments to the dynamic operation. + // + // Returns: + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.Binder + // and System.Linq.Expressions.DynamicExpression.Arguments set to the specified + // values. [Pure] - public static Expression Lambda(Expression body, IEnumerable parameters) + public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, params Expression[] arguments) { - Contract.Requires(body != null); - Contract.Ensures(Contract.Result>() != null); - return default(Expression); + Contract.Requires(binder != null); + Contract.Requires(returnType != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); } // // Summary: - // Creates an System.Linq.Expressions.Expression where the delegate - // type is known at compile time. + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder. // // Parameters: - // body: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body - // property equal to. + // binder: + // The runtime binder for the dynamic operation. // - // parameters: - // An array of System.Linq.Expressions.ParameterExpression objects to use to - // populate the System.Linq.Expressions.LambdaExpression.Parameters collection. + // returnType: + // The result type of the dynamic expression. // - // Type parameters: - // TDelegate: - // A delegate type. + // arg0: + // The first argument to the dynamic operation. + // + // arg1: + // The second argument to the dynamic operation. // // Returns: - // An System.Linq.Expressions.Expression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body - // and System.Linq.Expressions.LambdaExpression.Parameters properties set to - // the specified values. + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.Binder + // and System.Linq.Expressions.DynamicExpression.Arguments set to the specified + // values. + [Pure] + public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1) + { + Contract.Requires(binder != null); + Contract.Requires(returnType != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); + } // - // Exceptions: - // System.ArgumentNullException: - // body is null. -or- One or more elements in parameters are null. + // Summary: + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder. // - // System.ArgumentException: - // TDelegate is not a delegate type. -or- body.Type represents a type that - // is not assignable to the return type of TDelegate. -or- parameters does - // not contain the same number of elements as the list of parameters for TDelegate. - // -or- The System.Linq.Expressions.Expression.Type property of an element - // of parameters is not assignable from the type of the corresponding parameter - // type of TDelegate. + // Parameters: + // binder: + // The runtime binder for the dynamic operation. + // + // returnType: + // The result type of the dynamic expression. + // + // arg0: + // The first argument to the dynamic operation. + // + // arg1: + // The second argument to the dynamic operation. + // + // arg2: + // The third argument to the dynamic operation. + // + // Returns: + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.Binder + // and System.Linq.Expressions.DynamicExpression.Arguments set to the specified + // values. [Pure] - public static Expression Lambda(Expression body, params ParameterExpression[] parameters) + public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1, Expression arg2) { - Contract.Requires(body != null); - Contract.Ensures(Contract.Result>() != null); - return default(Expression); + Contract.Requires(binder != null); + Contract.Requires(returnType != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); } // // Summary: - // Creates a System.Linq.Expressions.LambdaExpression by first constructing - // a delegate type. + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder. // // Parameters: - // body: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body - // property equal to. + // binder: + // The runtime binder for the dynamic operation. // - // parameters: - // An array of System.Linq.Expressions.ParameterExpression objects to use to - // populate the System.Linq.Expressions.LambdaExpression.Parameters collection. + // returnType: + // The result type of the dynamic expression. // - // Returns: - // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body - // and System.Linq.Expressions.LambdaExpression.Parameters properties set to - // the specified values. + // arg0: + // The first argument to the dynamic operation. // - // Exceptions: - // System.ArgumentNullException: - // body is null. -or- One or more elements of parameters are null. + // arg1: + // The second argument to the dynamic operation. // - // System.ArgumentException: - // parameters contains more than four elements. + // arg2: + // The third argument to the dynamic operation. + // + // arg3: + // The fourth argument to the dynamic operation. + // + // Returns: + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.Binder + // and System.Linq.Expressions.DynamicExpression.Arguments set to the specified + // values. [Pure] - public static LambdaExpression Lambda(Expression body, params ParameterExpression[] parameters) + public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1, Expression arg2, Expression arg3) { - Contract.Requires(body != null); - Contract.Ensures(Contract.Result() != null); - return default(LambdaExpression); + Contract.Requires(binder != null); + Contract.Requires(returnType != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); + Contract.Requires(arg3 != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.LambdaExpression and can be used when the - // delegate type is not known at compile time. + // Creates an System.Linq.Expressions.ElementInit, given an System.Collections.Generic.IEnumerable + // as the second argument. // // Parameters: - // delegateType: - // A System.Type that represents a delegate type. - // - // body: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // addMethod: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.ElementInit.AddMethod // property equal to. // - // parameters: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.ParameterExpression - // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters - // collection. + // arguments: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression + // objects to set the System.Linq.Expressions.ElementInit.Arguments property + // equal to. // // Returns: - // An object that represents a lambda expression which has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body - // and System.Linq.Expressions.LambdaExpression.Parameters properties set to - // the specified values. + // An System.Linq.Expressions.ElementInit that has the System.Linq.Expressions.ElementInit.AddMethod + // and System.Linq.Expressions.ElementInit.Arguments properties set to the specified + // values. // // Exceptions: // System.ArgumentNullException: - // delegateType or body is null. -or- One or more elements in parameters are - // null. + // addMethod or arguments is null. // // System.ArgumentException: - // delegateType does not represent a delegate type. -or- body.Type represents - // a type that is not assignable to the return type of the delegate type represented - // by delegateType. -or- parameters does not contain the same number of elements - // as the list of parameters for the delegate type represented by delegateType. - // -or- The System.Linq.Expressions.Expression.Type property of an element - // of parameters is not assignable from the type of the corresponding parameter - // type of the delegate type represented by delegateType. + // The method that addMethod represents is not named "Add" (case insensitive). + // -or- The method that addMethod represents is not an instance method. -or- + // arguments does not contain the same number of elements as the number of parameters + // for the method that addMethod represents. -or- The System.Linq.Expressions.Expression.Type + // property of one or more elements of arguments is not assignable to the type + // of the corresponding parameter of the method that addMethod represents. [Pure] - public static LambdaExpression Lambda(Type delegateType, Expression body, IEnumerable parameters) + public static ElementInit ElementInit(MethodInfo addMethod, IEnumerable arguments) { - Contract.Requires(delegateType != null); - Contract.Requires(body != null); - Contract.Ensures(Contract.Result() != null); - return default(LambdaExpression); + Contract.Requires(addMethod != null); + Contract.Requires(arguments != null); + Contract.Ensures(Contract.Result() != null); + return default(ElementInit); } // // Summary: - // Creates a System.Linq.Expressions.LambdaExpression and can be used when the - // delegate type is not known at compile time. + // Creates an System.Linq.Expressions.ElementInit, given an array of values + // as the second argument. // // Parameters: - // delegateType: - // A System.Type that represents a delegate type. - // - // body: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // addMethod: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.ElementInit.AddMethod // property equal to. // - // parameters: - // An array of System.Linq.Expressions.ParameterExpression objects to use to - // populate the System.Linq.Expressions.LambdaExpression.Parameters collection. + // arguments: + // An array of System.Linq.Expressions.Expression objects to set the System.Linq.Expressions.ElementInit.Arguments + // property equal to. // // Returns: - // An object that represents a lambda expression which has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body - // and System.Linq.Expressions.LambdaExpression.Parameters properties set to - // the specified values. + // An System.Linq.Expressions.ElementInit that has the System.Linq.Expressions.ElementInit.AddMethod + // and System.Linq.Expressions.ElementInit.Arguments properties set to the specified + // values. // // Exceptions: // System.ArgumentNullException: - // delegateType or body is null. -or- One or more elements in parameters are - // null. + // addMethod or arguments is null. // // System.ArgumentException: - // delegateType does not represent a delegate type. -or- body.Type represents - // a type that is not assignable to the return type of the delegate type represented - // by delegateType. -or- parameters does not contain the same number of elements - // as the list of parameters for the delegate type represented by delegateType. - // -or- The System.Linq.Expressions.Expression.Type property of an element - // of parameters is not assignable from the type of the corresponding parameter - // type of the delegate type represented by delegateType. + // The method that addMethod represents is not named "Add" (case insensitive). + // -or- The method that addMethod represents is not an instance method. -or- + // arguments does not contain the same number of elements as the number of parameters + // for the method that addMethod represents. -or- The System.Linq.Expressions.Expression.Type + // property of one or more elements of arguments is not assignable to the type + // of the corresponding parameter of the method that addMethod represents. [Pure] - public static LambdaExpression Lambda(Type delegateType, Expression body, params ParameterExpression[] parameters) + public static ElementInit ElementInit(MethodInfo addMethod, params Expression[] arguments) { - Contract.Requires(delegateType != null); - Contract.Requires(body != null); - Contract.Ensures(Contract.Result() != null); - return default(LambdaExpression); + Contract.Requires(addMethod != null); + Contract.Requires(arguments != null); + Contract.Requires(arguments.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(ElementInit); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise - // left-shift operation. + // Creates an empty expression that has System.Void type. + // + // Returns: + // A System.Linq.Expressions.DefaultExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Default and the System.Linq.Expressions.Expression.Type + // property set to System.Void. + [Pure] + public static DefaultExpression Empty() + { + Contract.Ensures(Contract.Result() != null); + return default(DefaultExpression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents an equality + // comparison. // // Parameters: // left: @@ -2755,18 +3292,18 @@ public static LambdaExpression Lambda(Type delegateType, Expression body, params // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.LeftShift and the - // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right - // properties set to the specified values. + // property equal to System.Linq.Expressions.ExpressionType.Equal and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the + // specified values. // // Exceptions: // System.ArgumentNullException: // left or right is null. // // System.InvalidOperationException: - // The left-shift operator is not defined for left.Type and right.Type. + // The equality operator is not defined for left.Type and right.Type. [Pure] - public static BinaryExpression LeftShift(Expression left, Expression right) + public static BinaryExpression Equal(Expression left, Expression right) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -2775,8 +3312,8 @@ public static BinaryExpression LeftShift(Expression left, Expression right) } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise - // left-shift operation. The implementing method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents an equality + // comparison. The implementing method can be specified. // // Parameters: // left: @@ -2787,14 +3324,18 @@ public static BinaryExpression LeftShift(Expression left, Expression right) // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // liftToNull: + // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; + // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method // property equal to. // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.LeftShift and the - // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // property equal to System.Linq.Expressions.ExpressionType.Equal and the System.Linq.Expressions.BinaryExpression.Left, + // System.Linq.Expressions.BinaryExpression.Right, System.Linq.Expressions.BinaryExpression.IsLiftedToNull, // and System.Linq.Expressions.BinaryExpression.Method properties set to the // specified values. // @@ -2807,20 +3348,21 @@ public static BinaryExpression LeftShift(Expression left, Expression right) // (Shared in Visual Basic), or does not take exactly two arguments. // // System.InvalidOperationException: - // method is null and the left-shift operator is not defined for left.Type and + // method is null and the equality operator is not defined for left.Type and // right.Type. [Pure] - public static BinaryExpression LeftShift(Expression left, Expression right, MethodInfo method) + public static BinaryExpression Equal(Expression left, Expression right, bool liftToNull, MethodInfo method) { Contract.Requires(left != null); Contract.Requires(right != null); Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } + // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a "less - // than" numeric comparison. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // XOR operation. // // Parameters: // left: @@ -2833,8 +3375,8 @@ public static BinaryExpression LeftShift(Expression left, Expression right, Meth // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.LessThan and the - // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // property equal to System.Linq.Expressions.ExpressionType.ExclusiveOr and + // the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right // properties set to the specified values. // // Exceptions: @@ -2842,9 +3384,9 @@ public static BinaryExpression LeftShift(Expression left, Expression right, Meth // left or right is null. // // System.InvalidOperationException: - // The "less than" operator is not defined for left.Type and right.Type. + // The XOR operator is not defined for left.Type and right.Type. [Pure] - public static BinaryExpression LessThan(Expression left, Expression right) + public static BinaryExpression ExclusiveOr(Expression left, Expression right) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -2853,8 +3395,8 @@ public static BinaryExpression LessThan(Expression left, Expression right) } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a "less - // than" numeric comparison. The implementing method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // XOR operation. The implementing method can be specified. // // Parameters: // left: @@ -2865,20 +3407,16 @@ public static BinaryExpression LessThan(Expression left, Expression right) // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // - // liftToNull: - // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; - // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. - // // method: // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method // property equal to. // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.LessThan and the - // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // System.Linq.Expressions.BinaryExpression.IsLiftedToNull, and System.Linq.Expressions.BinaryExpression.Method - // properties set to the specified values. + // property equal to System.Linq.Expressions.ExpressionType.ExclusiveOr and + // the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the + // specified values. // // Exceptions: // System.ArgumentNullException: @@ -2889,20 +3427,21 @@ public static BinaryExpression LessThan(Expression left, Expression right) // (Shared in Visual Basic), or does not take exactly two arguments. // // System.InvalidOperationException: - // method is null and the "less than" operator is not defined for left.Type - // and right.Type. + // method is null and the XOR operator is not defined for left.Type and right.Type. [Pure] - public static BinaryExpression LessThan(Expression left, Expression right, bool liftToNull, MethodInfo method) + public static BinaryExpression ExclusiveOr(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); Contract.Requires(right != null); Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a " less - // than or equal" numeric comparison. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // XOR assignment operation, using op_ExclusiveOr for user-defined types. // // Parameters: // left: @@ -2915,18 +3454,11 @@ public static BinaryExpression LessThan(Expression left, Expression right, bool // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.LessThanOrEqual - // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // property equal to System.Linq.Expressions.ExpressionType.ExclusiveOrAssign and + // the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.InvalidOperationException: - // The "less than or equal" operator is not defined for left.Type and right.Type. [Pure] - public static BinaryExpression LessThanOrEqual(Expression left, Expression right) + public static BinaryExpression ExclusiveOrAssign(Expression left, Expression right) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -2935,8 +3467,8 @@ public static BinaryExpression LessThanOrEqual(Expression left, Expression right } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a " less - // than or equal" numeric comparison. The implementing method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // XOR assignment operation, using op_ExclusiveOr for user-defined types. // // Parameters: // left: @@ -2947,34 +3479,18 @@ public static BinaryExpression LessThanOrEqual(Expression left, Expression right // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // - // liftToNull: - // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; - // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. - // // method: // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method // property equal to. // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.LessThanOrEqual - // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // System.Linq.Expressions.BinaryExpression.IsLiftedToNull, and System.Linq.Expressions.BinaryExpression.Method - // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. - // - // System.InvalidOperationException: - // method is null and the "less than or equal" operator is not defined for left.Type - // and right.Type. + // property equal to System.Linq.Expressions.ExpressionType.ExclusiveOrAssign and + // the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the specified + // values. [Pure] - public static BinaryExpression LessThanOrEqual(Expression left, Expression right, bool liftToNull, MethodInfo method) + public static BinaryExpression ExclusiveOrAssign(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -2983,475 +3499,4572 @@ public static BinaryExpression LessThanOrEqual(Expression left, Expression right } // // Summary: - // Creates a System.Linq.Expressions.MemberListBinding where the member is a - // field or property. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // XOR assignment operation, using op_ExclusiveOr for user-defined types. // // Parameters: - // member: - // A System.Reflection.MemberInfo that represents a field or property to set - // the System.Linq.Expressions.MemberBinding.Member property equal to. + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. // - // initializers: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.ElementInit - // objects to use to populate the System.Linq.Expressions.MemberListBinding.Initializers - // collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // - // Returns: - // A System.Linq.Expressions.MemberListBinding that has the System.Linq.Expressions.MemberBinding.BindingType - // property equal to System.Linq.Expressions.MemberBindingType.ListBinding and - // the System.Linq.Expressions.MemberBinding.Member and System.Linq.Expressions.MemberListBinding.Initializers - // properties set to the specified values. + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. // - // Exceptions: - // System.ArgumentNullException: - // member is null. -or- One or more elements of initializers is null. + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. // - // System.ArgumentException: - // member does not represent a field or property. -or- The System.Reflection.FieldInfo.FieldType - // or System.Reflection.PropertyInfo.PropertyType of the field or property that - // member represents does not implement System.Collections.IEnumerable. + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ExclusiveOrAssign and + // the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion + // properties set to the specified values. [Pure] - public static MemberListBinding ListBind(MemberInfo member, IEnumerable initializers) + public static BinaryExpression ExclusiveOrAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) { - Contract.Requires(member != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberListBinding); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.MemberListBinding where the member is a - // field or property. + // Creates a System.Linq.Expressions.MemberExpression that represents accessing + // a field. // // Parameters: - // member: - // A System.Reflection.MemberInfo that represents a field or property to set - // the System.Linq.Expressions.MemberBinding.Member property equal to. + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.MemberExpression.Expression + // property equal to. // - // initializers: - // An array of System.Linq.Expressions.ElementInit objects to use to populate - // the System.Linq.Expressions.MemberListBinding.Initializers collection. + // field: + // The System.Reflection.FieldInfo to set the System.Linq.Expressions.MemberExpression.Member + // property equal to. // // Returns: - // A System.Linq.Expressions.MemberListBinding that has the System.Linq.Expressions.MemberBinding.BindingType - // property equal to System.Linq.Expressions.MemberBindingType.ListBinding and - // the System.Linq.Expressions.MemberBinding.Member and System.Linq.Expressions.MemberListBinding.Initializers + // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MemberAccess and + // the System.Linq.Expressions.MemberExpression.Expression and System.Linq.Expressions.MemberExpression.Member // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: - // member is null. -or- One or more elements of initializers is null. + // field is null. -or- The field represented by field is not static (Shared + // in Visual Basic) and expression is null. // // System.ArgumentException: - // member does not represent a field or property. -or- The System.Reflection.FieldInfo.FieldType - // or System.Reflection.PropertyInfo.PropertyType of the field or property that - // member represents does not implement System.Collections.IEnumerable. + // expression.Type is not assignable to the declaring type of the field represented + // by field. [Pure] - public static MemberListBinding ListBind(MemberInfo member, params ElementInit[] initializers) + public static MemberExpression Field(Expression expression, FieldInfo field) { - Contract.Requires(member != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberListBinding); + Contract.Requires(field != null); + Contract.Requires(field.IsStatic || expression != null); + Contract.Requires(!field.IsStatic || expression == null); + Contract.Ensures(Contract.Result() != null); + return default(MemberExpression); } // // Summary: - // Creates a System.Linq.Expressions.MemberListBinding based on a specified - // property accessor method. + // Creates a System.Linq.Expressions.MemberExpression that represents accessing + // a field given the name of the field. // // Parameters: - // propertyAccessor: - // A System.Reflection.MethodInfo that represents a property accessor method. + // expression: + // An System.Linq.Expressions.Expression whose System.Linq.Expressions.Expression.Type + // contains a field named fieldName. // - // initializers: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.ElementInit - // objects to use to populate the System.Linq.Expressions.MemberListBinding.Initializers - // collection. + // fieldName: + // The name of a field. // // Returns: - // A System.Linq.Expressions.MemberListBinding that has the System.Linq.Expressions.MemberBinding.BindingType - // property equal to System.Linq.Expressions.MemberBindingType.ListBinding, - // the System.Linq.Expressions.MemberBinding.Member property set to the System.Reflection.MemberInfo - // that represents the property accessed in propertyAccessor, and System.Linq.Expressions.MemberListBinding.Initializers - // populated with the elements of initializers. + // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MemberAccess, the + // System.Linq.Expressions.MemberExpression.Expression property set to expression, + // and the System.Linq.Expressions.MemberExpression.Member property set to the + // System.Reflection.FieldInfo that represents the field denoted by fieldName. // // Exceptions: // System.ArgumentNullException: - // propertyAccessor is null. -or- One or more elements of initializers are null. + // expression or fieldName is null. // // System.ArgumentException: - // propertyAccessor does not represent a property accessor method. -or- The - // System.Reflection.PropertyInfo.PropertyType of the property that the method - // represented by propertyAccessor accesses does not implement System.Collections.IEnumerable. + // No field named fieldName is defined in expression.Type or its base types. [Pure] - public static MemberListBinding ListBind(MethodInfo propertyAccessor, IEnumerable initializers) + public static MemberExpression Field(Expression expression, string fieldName) { - Contract.Requires(propertyAccessor != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberListBinding); + Contract.Requires(fieldName != null); + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberExpression); } +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.MemberListBinding object based on a specified - // property accessor method. + // Creates a System.Linq.Expressions.MemberExpression that represents accessing + // a field. // // Parameters: - // propertyAccessor: - // A System.Reflection.MethodInfo that represents a property accessor method. - // - // initializers: - // An array of System.Linq.Expressions.ElementInit objects to use to populate - // the System.Linq.Expressions.MemberListBinding.Initializers collection. + // expression: + // The containing object of the field. This can be null for static fields. // - // Returns: - // A System.Linq.Expressions.MemberListBinding that has the System.Linq.Expressions.MemberBinding.BindingType - // property equal to System.Linq.Expressions.MemberBindingType.ListBinding, - // the System.Linq.Expressions.MemberBinding.Member property set to the System.Reflection.MemberInfo - // that represents the property accessed in propertyAccessor, and System.Linq.Expressions.MemberListBinding.Initializers - // populated with the elements of initializers. + // type: + // The System.Linq.Expressions.Expression.Type that contains the field. // - // Exceptions: - // System.ArgumentNullException: - // propertyAccessor is null. -or- One or more elements of initializers is null. + // fieldName: + // The field to be accessed. // - // System.ArgumentException: - // propertyAccessor does not represent a property accessor method. -or- The - // System.Reflection.PropertyInfo.PropertyType of the property that the method - // represented by propertyAccessor accesses does not implement System.Collections.IEnumerable. + // Returns: + // The created System.Linq.Expressions.MemberExpression. [Pure] - public static MemberListBinding ListBind(MethodInfo propertyAccessor, params ElementInit[] initializers) + public static MemberExpression Field(Expression expression, Type type, string fieldName) { - Contract.Requires(propertyAccessor != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberListBinding); + Contract.Requires(type != null); + Contract.Requires(fieldName != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.ListInitExpression that uses specified + // Creates a System.Type object that represents a generic System.Action delegate + // type that has specific type arguments. + // + // Parameters: + // typeArgs: + // An array of zero to four System.Type objects that specify the type arguments + // for the System.Action delegate type. + // + // Returns: + // The type of a System.Action delegate that has the specified type arguments. + // + // Exceptions: + // System.ArgumentException: + // typeArgs contains more than four elements. + // + // System.ArgumentNullException: + // typeArgs is null. + [Pure] + public static Type GetActionType(params Type[] typeArgs) + { + Contract.Requires(typeArgs != null); +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + Contract.Requires(typeArgs.Length <= 16); +#else + Contract.Requires(typeArgs.Length <= 4); +#endif + Contract.Ensures(Contract.Result() != null); + return default(Type); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Gets a System.Linq.Expressions.Expression.Type object that represents a generic + // System.Func or System.Action delegate type that has specific type arguments. + // + // Parameters: + // typeArgs: + // The type arguments of the delegate. + // + // Returns: + // The delegate type. + [Pure] + public static Type GetDelegateType(params Type[] typeArgs) + { + Contract.Requires(typeArgs != null); + Contract.Requires(typeArgs.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(Type); + } +#endif + + // + // Summary: + // Creates a System.Type object that represents a generic System.Func delegate + // type that has specific type arguments. + // + // Parameters: + // typeArgs: + // An array of one to five System.Type objects that specify the type arguments + // for the System.Func delegate type. + // + // Returns: + // The type of a System.Func delegate that has the specified type arguments. + // + // Exceptions: + // System.ArgumentException: + // typeArgs contains less than one or more than five elements. + // + // System.ArgumentNullException: + // typeArgs is null. + [Pure] + public static Type GetFuncType(params Type[] typeArgs) + { + Contract.Requires(typeArgs != null); + Contract.Requires(typeArgs.Length >= 1); +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + Contract.Requires(typeArgs.Length <= 17); +#else + Contract.Requires(typeArgs.Length <= 5); +#endif + Contract.Ensures(Contract.Result() != null); + return default(Type); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a "go to" statement. + // + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Goto, the System.Linq.Expressions.GotoExpression.Target property set + // to the specified value, and a null value to be passed to the target label upon + // jumping. + [Pure] + public static GotoExpression Goto(LabelTarget target) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a "go to" statement. + // The value passed to the label upon jumping can be specified. + // + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // value: + // The value that will be passed to the associated label upon jumping. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Goto, the System.Linq.Expressions.GotoExpression.Target property set + // to target, and value to be passed to the target label upon jumping. + [Pure] + public static GotoExpression Goto(LabelTarget target, Expression value) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a "go to" statement + // with the specified type. + // + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // type: + // An System.Type to set the System.Linq.Expressions.Expression.Type property equal + // to. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Goto, the System.Linq.Expressions.GotoExpression.Target property set + // to the specified value, the System.Linq.Expressions.Expression.Type property + // set to type, and a null value to be passed to the target label upon jumping. + [Pure] + public static GotoExpression Goto(LabelTarget target, Type type) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a "go to" statement + // with the specified type. The value passed to the label upon jumping can be specified. + // + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // value: + // The value that will be passed to the associated label upon jumping. + // + // type: + // An System.Type to set the System.Linq.Expressions.Expression.Type property equal + // to. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Goto, the System.Linq.Expressions.GotoExpression.Target property set + // to target, the System.Linq.Expressions.Expression.Type property set to type, + // and value to be passed to the target label upon jumping. + [Pure] + public static GotoExpression Goto(LabelTarget target, Expression value, Type type) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a "greater + // than" numeric comparison. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.GreaterThan and + // the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.InvalidOperationException: + // The "greater than" operator is not defined for left.Type and right.Type. + [Pure] + public static BinaryExpression GreaterThan(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a "greater + // than" numeric comparison. The implementing method can be specified. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // liftToNull: + // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; + // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.GreaterThan and + // the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.IsLiftedToNull, and System.Linq.Expressions.BinaryExpression.Method + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the "greater than" operator is not defined for left.Type + // and right.Type. + [Pure] + public static BinaryExpression GreaterThan(Expression left, Expression right, bool liftToNull, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a "greater + // than or equal" numeric comparison. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.GreaterThanOrEqual + // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.InvalidOperationException: + // The "greater than or equal" operator is not defined for left.Type and right.Type. + [Pure] + public static BinaryExpression GreaterThanOrEqual(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a "greater + // than or equal" numeric comparison. The implementing method can be specified. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // liftToNull: + // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; + // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.GreaterThanOrEqual + // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.IsLiftedToNull, and System.Linq.Expressions.BinaryExpression.Method + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the "greater than or equal" operator is not defined for + // left.Type and right.Type. + [Pure] + public static BinaryExpression GreaterThanOrEqual(Expression left, Expression right, bool liftToNull, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.ConditionalExpression that represents a conditional + // block with an if statement. + // + // Parameters: + // test: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.Test + // property equal to. + // + // ifTrue: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.IfTrue + // property equal to. + // + // Returns: + // A System.Linq.Expressions.ConditionalExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Conditional and the + // System.Linq.Expressions.ConditionalExpression.Test, System.Linq.Expressions.ConditionalExpression.IfTrue, + // properties set to the specified values. The System.Linq.Expressions.ConditionalExpression.IfFalse + // property is set to default expression and the type of the resulting System.Linq.Expressions.ConditionalExpression + // returned by this method is System.Void. + [Pure] + public static ConditionalExpression IfThen(Expression test, Expression ifTrue) + { + Contract.Requires(test != null); + Contract.Requires(ifTrue != null); + Contract.Ensures(Contract.Result() != null); + return default(ConditionalExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.ConditionalExpression that represents a conditional + // block with if and else statements. + // + // Parameters: + // test: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.Test + // property equal to. + // + // ifTrue: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.IfTrue + // property equal to. + // + // ifFalse: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.ConditionalExpression.IfFalse + // property equal to. + // + // Returns: + // A System.Linq.Expressions.ConditionalExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Conditional and the + // System.Linq.Expressions.ConditionalExpression.Test, System.Linq.Expressions.ConditionalExpression.IfTrue, + // and System.Linq.Expressions.ConditionalExpression.IfFalse properties set to the + // specified values. The type of the resulting System.Linq.Expressions.ConditionalExpression + // returned by this method is System.Void. + [Pure] + public static ConditionalExpression IfThenElse(Expression test, Expression ifTrue, Expression ifFalse) + { + Contract.Requires(test != null); + Contract.Requires(ifTrue != null); + Contract.Requires(ifFalse != null); + Contract.Ensures(Contract.Result() != null); + return default(ConditionalExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents the incrementing + // of the expression value by 1. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to increment. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that represents the incremented expression. + [Pure] + public static UnaryExpression Increment(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents the incrementing + // of the expression by 1. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to increment. + // + // method: + // A System.Reflection.MethodInfo that represents the implementing method. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that represents the incremented expression. + [Pure] + public static UnaryExpression Increment(Expression expression, MethodInfo method) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } +#endif + + // + // Summary: + // Creates an System.Linq.Expressions.InvocationExpression. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.InvocationExpression.Expression + // property equal to. + // + // arguments: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression + // objects to use to populate the System.Linq.Expressions.InvocationExpression.Arguments + // collection. + // + // Returns: + // An System.Linq.Expressions.InvocationExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Invoke and the System.Linq.Expressions.InvocationExpression.Expression + // and System.Linq.Expressions.InvocationExpression.Arguments properties set + // to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // expression is null. + // + // System.ArgumentException: + // expression.Type does not represent a delegate type or an System.Linq.Expressions.Expression. + // -or- The System.Linq.Expressions.Expression.Type property of an element + // of arguments is not assignable to the type of the corresponding parameter + // of the delegate represented by expression. + // + // System.InvalidOperationException: + // arguments does not contain the same number of elements as the list of parameters + // for the delegate represented by expression. + [Pure] + public static InvocationExpression Invoke(Expression expression, IEnumerable arguments) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(InvocationExpression); + } + // + // Summary: + // Creates an System.Linq.Expressions.InvocationExpression. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.InvocationExpression.Expression + // property equal to. + // + // arguments: + // An array of System.Linq.Expressions.Expression objects to use to populate + // the System.Linq.Expressions.InvocationExpression.Arguments collection. + // + // Returns: + // An System.Linq.Expressions.InvocationExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Invoke and the System.Linq.Expressions.InvocationExpression.Expression + // and System.Linq.Expressions.InvocationExpression.Arguments properties set + // to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // expression is null. + // + // System.ArgumentException: + // expression.Type does not represent a delegate type or an System.Linq.Expressions.Expression. + // -or- The System.Linq.Expressions.Expression.Type property of an element + // of arguments is not assignable to the type of the corresponding parameter + // of the delegate represented by expression. + // + // System.InvalidOperationException: + // arguments does not contain the same number of elements as the list of parameters + // for the delegate represented by expression. + [Pure] + public static InvocationExpression Invoke(Expression expression, params Expression[] arguments) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(InvocationExpression); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Returns whether the expression evaluates to false. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to evaluate. + // + // Returns: + // An instance of System.Linq.Expressions.UnaryExpression. + [Pure] + public static UnaryExpression IsFalse(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + // + // Summary: + // Returns whether the expression evaluates to false. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to evaluate. + // + // method: + // A System.Reflection.MethodInfo that represents the implementing method. + // + // Returns: + // An instance of System.Linq.Expressions.UnaryExpression. + [Pure] + public static UnaryExpression IsFalse(Expression expression, MethodInfo method) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Returns whether the expression evaluates to true. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to evaluate. + // + // Returns: + // An instance of System.Linq.Expressions.UnaryExpression. + [Pure] + public static UnaryExpression IsTrue(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + // + // Summary: + // Returns whether the expression evaluates to true. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to evaluate. + // + // method: + // A System.Reflection.MethodInfo that represents the implementing method. + // + // Returns: + // An instance of System.Linq.Expressions.UnaryExpression. + [Pure] + public static UnaryExpression IsTrue(Expression expression, MethodInfo method) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.LabelTarget representing a label with void + // type and no name. + // + // Returns: + // The new System.Linq.Expressions.LabelTarget. + [Pure] + public static LabelTarget Label() + { + Contract.Ensures(Contract.Result() != null); + Contract.Ensures(Contract.Result().Type == typeof(void)); + return default(LabelTarget); + } + // + // Summary: + // Creates a System.Linq.Expressions.LabelTarget representing a label with the given + // type. + // + // Parameters: + // type: + // The type of value that is passed when jumping to the label. + // + // Returns: + // The new System.Linq.Expressions.LabelTarget. + [Pure] + public static LabelTarget Label(Type type) + { + Contract.Ensures(Contract.Result() != null); + Contract.Ensures(Contract.Result().Type == type); + return default(LabelTarget); + } + // + // Summary: + // Creates a System.Linq.Expressions.LabelTarget representing a label with void + // type and the given name. + // + // Parameters: + // name: + // The name of the label. + // + // Returns: + // The new System.Linq.Expressions.LabelTarget. + [Pure] + public static LabelTarget Label(string name) + { + Contract.Ensures(Contract.Result() != null); + Contract.Ensures(Contract.Result().Type == typeof(void)); + return default(LabelTarget); + } + // + // Summary: + // Creates a System.Linq.Expressions.LabelExpression representing a label without + // a default value. + // + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget which this System.Linq.Expressions.LabelExpression + // will be associated with. + // + // Returns: + // A System.Linq.Expressions.LabelExpression without a default value. + [Pure] + public static LabelExpression Label(LabelTarget target) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + Contract.Ensures(Contract.Result().Target == target); + return default(LabelExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.LabelTarget representing a label with the given + // type and name. + // + // Parameters: + // type: + // The type of value that is passed when jumping to the label. + // + // name: + // The name of the label. + // + // Returns: + // The new System.Linq.Expressions.LabelTarget. + [Pure] + public static LabelTarget Label(Type type, string name) + { + Contract.Ensures(Contract.Result() != null); + return default(LabelTarget); + } + // + // Summary: + // Creates a System.Linq.Expressions.LabelExpression representing a label with the + // given default value. + // + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget which this System.Linq.Expressions.LabelExpression + // will be associated with. + // + // defaultValue: + // The value of this System.Linq.Expressions.LabelExpression when the label is reached + // through regular control flow. + // + // Returns: + // A System.Linq.Expressions.LabelExpression with the given default value. + [Pure] + public static LabelExpression Label(LabelTarget target, Expression defaultValue) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + Contract.Ensures(Contract.Result().Target == target); + return default(LabelExpression); + } +#endif + + // + // Summary: + // Creates an System.Linq.Expressions.Expression where the delegate + // type is known at compile time. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // parameters: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Type parameters: + // TDelegate: + // A delegate type. + // + // Returns: + // An System.Linq.Expressions.Expression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to + // the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // body is null. -or- One or more elements in parameters are null. + // + // System.ArgumentException: + // TDelegate is not a delegate type. -or- body.Type represents a type that + // is not assignable to the return type of TDelegate. -or- parameters does + // not contain the same number of elements as the list of parameters for TDelegate. + // -or- The System.Linq.Expressions.Expression.Type property of an element + // of parameters is not assignable from the type of the corresponding parameter + // type of TDelegate. + [Pure] + public static Expression Lambda(Expression body, IEnumerable parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result>() != null); + return default(Expression); + } + // + // Summary: + // Creates an System.Linq.Expressions.Expression where the delegate + // type is known at compile time. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // parameters: + // An array of System.Linq.Expressions.ParameterExpression objects to use to + // populate the System.Linq.Expressions.LambdaExpression.Parameters collection. + // + // Type parameters: + // TDelegate: + // A delegate type. + // + // Returns: + // An System.Linq.Expressions.Expression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to + // the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // body is null. -or- One or more elements in parameters are null. + // + // System.ArgumentException: + // TDelegate is not a delegate type. -or- body.Type represents a type that + // is not assignable to the return type of TDelegate. -or- parameters does + // not contain the same number of elements as the list of parameters for TDelegate. + // -or- The System.Linq.Expressions.Expression.Type property of an element + // of parameters is not assignable from the type of the corresponding parameter + // type of TDelegate. + [Pure] + public static Expression Lambda(Expression body, params ParameterExpression[] parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result>() != null); + return default(Expression); + } + // + // Summary: + // Creates a System.Linq.Expressions.LambdaExpression by first constructing + // a delegate type. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // parameters: + // An array of System.Linq.Expressions.ParameterExpression objects to use to + // populate the System.Linq.Expressions.LambdaExpression.Parameters collection. + // + // Returns: + // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to + // the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // body is null. -or- One or more elements of parameters are null. + // + // System.ArgumentException: + // parameters contains more than four elements. + [Pure] + public static LambdaExpression Lambda(Expression body, params ParameterExpression[] parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.LambdaExpression and can be used when the + // delegate type is not known at compile time. + // + // Parameters: + // delegateType: + // A System.Type that represents a delegate type. + // + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // parameters: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Returns: + // An object that represents a lambda expression which has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to + // the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // delegateType or body is null. -or- One or more elements in parameters are + // null. + // + // System.ArgumentException: + // delegateType does not represent a delegate type. -or- body.Type represents + // a type that is not assignable to the return type of the delegate type represented + // by delegateType. -or- parameters does not contain the same number of elements + // as the list of parameters for the delegate type represented by delegateType. + // -or- The System.Linq.Expressions.Expression.Type property of an element + // of parameters is not assignable from the type of the corresponding parameter + // type of the delegate type represented by delegateType. + [Pure] + public static LambdaExpression Lambda(Type delegateType, Expression body, IEnumerable parameters) + { + Contract.Requires(delegateType != null); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.LambdaExpression and can be used when the + // delegate type is not known at compile time. + // + // Parameters: + // delegateType: + // A System.Type that represents a delegate type. + // + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // parameters: + // An array of System.Linq.Expressions.ParameterExpression objects to use to + // populate the System.Linq.Expressions.LambdaExpression.Parameters collection. + // + // Returns: + // An object that represents a lambda expression which has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to + // the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // delegateType or body is null. -or- One or more elements in parameters are + // null. + // + // System.ArgumentException: + // delegateType does not represent a delegate type. -or- body.Type represents + // a type that is not assignable to the return type of the delegate type represented + // by delegateType. -or- parameters does not contain the same number of elements + // as the list of parameters for the delegate type represented by delegateType. + // -or- The System.Linq.Expressions.Expression.Type property of an element + // of parameters is not assignable from the type of the corresponding parameter + // type of the delegate type represented by delegateType. + [Pure] + public static LambdaExpression Lambda(Type delegateType, Expression body, params ParameterExpression[] parameters) + { + Contract.Requires(delegateType != null); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a LambdaExpression by first constructing a delegate type. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // parameters: + // An System.Collections.Generic.IEnumerable`1 that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Returns: + // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static LambdaExpression Lambda(Expression body, IEnumerable parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates a LambdaExpression by first constructing a delegate type. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // tailCall: + // A System.Boolean that indicates if tail call optimization will be applied when + // compiling the created expression. + // + // parameters: + // An System.Collections.Generic.IEnumerable`1 that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Returns: + // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static LambdaExpression Lambda(Expression body, bool tailCall, IEnumerable parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates a LambdaExpression by first constructing a delegate type. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // name: + // The name for the lambda. Used for emitting debug information. + // + // parameters: + // An System.Collections.Generic.IEnumerable`1 that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Returns: + // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static LambdaExpression Lambda(Expression body, string name, IEnumerable parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates a LambdaExpression by first constructing a delegate type. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // tailCall: + // A System.Boolean that indicates if tail call optimization will be applied when + // compiling the created expression. + // + // parameters: + // An array that contains System.Linq.Expressions.ParameterExpression objects to + // use to populate the System.Linq.Expressions.LambdaExpression.Parameters collection. + // + // Returns: + // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static LambdaExpression Lambda(Expression body, bool tailCall, params ParameterExpression[] parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates a LambdaExpression by first constructing a delegate type. + // + // Parameters: + // delegateType: + // A System.Linq.Expressions.Expression.Type representing the delegate signature + // for the lambda. + // + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // tailCall: + // A System.Boolean that indicates if tail call optimization will be applied when + // compiling the created expression. + // + // parameters: + // An System.Collections.Generic.IEnumerable`1 that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Returns: + // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static LambdaExpression Lambda(Type delegateType, Expression body, bool tailCall, IEnumerable parameters) + { + Contract.Requires(delegateType != null); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates a LambdaExpression by first constructing a delegate type. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // name: + // The name for the lambda. Used for emitting debug information. + // + // tailCall: + // A System.Boolean that indicates if tail call optimization will be applied when + // compiling the created expression. + // + // parameters: + // An System.Collections.Generic.IEnumerable`1 that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Returns: + // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static LambdaExpression Lambda(Expression body, string name, bool tailCall, IEnumerable parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates a LambdaExpression by first constructing a delegate type. + // + // Parameters: + // delegateType: + // A System.Linq.Expressions.Expression.Type representing the delegate signature + // for the lambda. + // + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // name: + // The name for the lambda. Used for emitting debug information. + // + // parameters: + // An System.Collections.Generic.IEnumerable`1 that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Returns: + // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static LambdaExpression Lambda(Type delegateType, Expression body, string name, IEnumerable parameters) + { + Contract.Requires(delegateType != null); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates a LambdaExpression by first constructing a delegate type. + // + // Parameters: + // delegateType: + // A System.Linq.Expressions.Expression.Type representing the delegate signature + // for the lambda. + // + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // tailCall: + // A System.Boolean that indicates if tail call optimization will be applied when + // compiling the created expression. + // + // parameters: + // An array that contains System.Linq.Expressions.ParameterExpression objects to + // use to populate the System.Linq.Expressions.LambdaExpression.Parameters collection. + // + // Returns: + // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static LambdaExpression Lambda(Type delegateType, Expression body, bool tailCall, params ParameterExpression[] parameters) + { + Contract.Requires(delegateType != null); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates a LambdaExpression by first constructing a delegate type. + // + // Parameters: + // delegateType: + // A System.Linq.Expressions.Expression.Type representing the delegate signature + // for the lambda. + // + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // name: + // The name for the lambda. Used for emitting debug information. + // + // tailCall: + // A System.Boolean that indicates if tail call optimization will be applied when + // compiling the created expression. + // + // parameters: + // An System.Collections.Generic.IEnumerable`1 that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Returns: + // A System.Linq.Expressions.LambdaExpression that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static LambdaExpression Lambda(Type delegateType, Expression body, string name, bool tailCall, IEnumerable parameters) + { + Contract.Requires(delegateType != null); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LambdaExpression); + } + // + // Summary: + // Creates an System.Linq.Expressions.Expression`1 where the delegate type is known + // at compile time. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // tailCall: + // A System.Boolean that indicates if tail call optimization will be applied when + // compiling the created expression. + // + // parameters: + // An System.Collections.Generic.IEnumerable`1 that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Type parameters: + // TDelegate: + // The delegate type. + // + // Returns: + // An System.Linq.Expressions.Expression`1 that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Lambdaand the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static Expression Lambda(Expression body, bool tailCall, IEnumerable parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result>() != null); + return default(Expression); + } + // + // Summary: + // Creates an System.Linq.Expressions.Expression`1 where the delegate type is known + // at compile time. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.Expression`1.Body + // property equal to. + // + // name: + // The name of the lambda. Used for generating debugging information. + // + // parameters: + // An System.Collections.Generic.IEnumerable`1 that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.Expression`1.Parameters + // collection. + // + // Type parameters: + // TDelegate: + // The delegate type. + // + // Returns: + // An System.Linq.Expressions.Expression`1 that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static Expression Lambda(Expression body, string name, IEnumerable parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result>() != null); + return default(Expression); + } + // + // Summary: + // Creates an System.Linq.Expressions.Expression`1 where the delegate type is known + // at compile time. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // tailCall: + // A System.Boolean that indicates if tail call optimization will be applied when + // compiling the created expression. + // + // parameters: + // An array that contains System.Linq.Expressions.ParameterExpression objects to + // use to populate the System.Linq.Expressions.LambdaExpression.Parameters collection. + // + // Type parameters: + // TDelegate: + // The delegate type. + // + // Returns: + // An System.Linq.Expressions.Expression`1 that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static Expression Lambda(Expression body, bool tailCall, params ParameterExpression[] parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result>() != null); + return default(Expression); + } + // + // Summary: + // Creates an System.Linq.Expressions.Expression`1 where the delegate type is known + // at compile time. + // + // Parameters: + // body: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.LambdaExpression.Body + // property equal to. + // + // name: + // The name of the lambda. Used for generating debugging info. + // + // tailCall: + // A System.Boolean that indicates if tail call optimization will be applied when + // compiling the created expression. + // + // parameters: + // An System.Collections.Generic.IEnumerable`1 that contains System.Linq.Expressions.ParameterExpression + // objects to use to populate the System.Linq.Expressions.LambdaExpression.Parameters + // collection. + // + // Type parameters: + // TDelegate: + // The delegate type. + // + // Returns: + // An System.Linq.Expressions.Expression`1 that has the System.Linq.Expressions.LambdaExpression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Lambda and the System.Linq.Expressions.LambdaExpression.Body + // and System.Linq.Expressions.LambdaExpression.Parameters properties set to the + // specified values. + [Pure] + public static Expression Lambda(Expression body, string name, bool tailCall, IEnumerable parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result>() != null); + return default(Expression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // left-shift operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.LeftShift and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.InvalidOperationException: + // The left-shift operator is not defined for left.Type and right.Type. + [Pure] + public static BinaryExpression LeftShift(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // left-shift operation. The implementing method can be specified. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.LeftShift and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the + // specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the left-shift operator is not defined for left.Type and + // right.Type. + [Pure] + public static BinaryExpression LeftShift(Expression left, Expression right, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // left-shift assignment operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.LeftShiftAssign and + // the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + [Pure] + public static BinaryExpression LeftShiftAssign(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // left-shift assignment operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.LeftShiftAssign and + // the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the specified + // values. + [Pure] + public static BinaryExpression LeftShiftAssign(Expression left, Expression right, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // left-shift assignment operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.LeftShiftAssign and + // the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion + // properties set to the specified values. + [Pure] + public static BinaryExpression LeftShiftAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a "less + // than" numeric comparison. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.LessThan and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.InvalidOperationException: + // The "less than" operator is not defined for left.Type and right.Type. + [Pure] + public static BinaryExpression LessThan(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a "less + // than" numeric comparison. The implementing method can be specified. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // liftToNull: + // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; + // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.LessThan and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.IsLiftedToNull, and System.Linq.Expressions.BinaryExpression.Method + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the "less than" operator is not defined for left.Type + // and right.Type. + [Pure] + public static BinaryExpression LessThan(Expression left, Expression right, bool liftToNull, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a " less + // than or equal" numeric comparison. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.LessThanOrEqual + // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.InvalidOperationException: + // The "less than or equal" operator is not defined for left.Type and right.Type. + [Pure] + public static BinaryExpression LessThanOrEqual(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a " less + // than or equal" numeric comparison. The implementing method can be specified. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // liftToNull: + // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; + // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.LessThanOrEqual + // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.IsLiftedToNull, and System.Linq.Expressions.BinaryExpression.Method + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the "less than or equal" operator is not defined for left.Type + // and right.Type. + [Pure] + public static BinaryExpression LessThanOrEqual(Expression left, Expression right, bool liftToNull, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.MemberListBinding where the member is a + // field or property. + // + // Parameters: + // member: + // A System.Reflection.MemberInfo that represents a field or property to set + // the System.Linq.Expressions.MemberBinding.Member property equal to. + // + // initializers: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.ElementInit + // objects to use to populate the System.Linq.Expressions.MemberListBinding.Initializers + // collection. + // + // Returns: + // A System.Linq.Expressions.MemberListBinding that has the System.Linq.Expressions.MemberBinding.BindingType + // property equal to System.Linq.Expressions.MemberBindingType.ListBinding and + // the System.Linq.Expressions.MemberBinding.Member and System.Linq.Expressions.MemberListBinding.Initializers + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // member is null. -or- One or more elements of initializers is null. + // + // System.ArgumentException: + // member does not represent a field or property. -or- The System.Reflection.FieldInfo.FieldType + // or System.Reflection.PropertyInfo.PropertyType of the field or property that + // member represents does not implement System.Collections.IEnumerable. + [Pure] + public static MemberListBinding ListBind(MemberInfo member, IEnumerable initializers) + { + Contract.Requires(member != null); + Contract.Requires(initializers != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberListBinding); + } + // + // Summary: + // Creates a System.Linq.Expressions.MemberListBinding where the member is a + // field or property. + // + // Parameters: + // member: + // A System.Reflection.MemberInfo that represents a field or property to set + // the System.Linq.Expressions.MemberBinding.Member property equal to. + // + // initializers: + // An array of System.Linq.Expressions.ElementInit objects to use to populate + // the System.Linq.Expressions.MemberListBinding.Initializers collection. + // + // Returns: + // A System.Linq.Expressions.MemberListBinding that has the System.Linq.Expressions.MemberBinding.BindingType + // property equal to System.Linq.Expressions.MemberBindingType.ListBinding and + // the System.Linq.Expressions.MemberBinding.Member and System.Linq.Expressions.MemberListBinding.Initializers + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // member is null. -or- One or more elements of initializers is null. + // + // System.ArgumentException: + // member does not represent a field or property. -or- The System.Reflection.FieldInfo.FieldType + // or System.Reflection.PropertyInfo.PropertyType of the field or property that + // member represents does not implement System.Collections.IEnumerable. + [Pure] + public static MemberListBinding ListBind(MemberInfo member, params ElementInit[] initializers) + { + Contract.Requires(member != null); + Contract.Requires(initializers != null); + Contract.Requires(initializers.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(MemberListBinding); + } + // + // Summary: + // Creates a System.Linq.Expressions.MemberListBinding based on a specified + // property accessor method. + // + // Parameters: + // propertyAccessor: + // A System.Reflection.MethodInfo that represents a property accessor method. + // + // initializers: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.ElementInit + // objects to use to populate the System.Linq.Expressions.MemberListBinding.Initializers + // collection. + // + // Returns: + // A System.Linq.Expressions.MemberListBinding that has the System.Linq.Expressions.MemberBinding.BindingType + // property equal to System.Linq.Expressions.MemberBindingType.ListBinding, + // the System.Linq.Expressions.MemberBinding.Member property set to the System.Reflection.MemberInfo + // that represents the property accessed in propertyAccessor, and System.Linq.Expressions.MemberListBinding.Initializers + // populated with the elements of initializers. + // + // Exceptions: + // System.ArgumentNullException: + // propertyAccessor is null. -or- One or more elements of initializers are null. + // + // System.ArgumentException: + // propertyAccessor does not represent a property accessor method. -or- The + // System.Reflection.PropertyInfo.PropertyType of the property that the method + // represented by propertyAccessor accesses does not implement System.Collections.IEnumerable. + [Pure] + public static MemberListBinding ListBind(MethodInfo propertyAccessor, IEnumerable initializers) + { + Contract.Requires(propertyAccessor != null); + Contract.Requires(initializers != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberListBinding); + } + // + // Summary: + // Creates a System.Linq.Expressions.MemberListBinding object based on a specified + // property accessor method. + // + // Parameters: + // propertyAccessor: + // A System.Reflection.MethodInfo that represents a property accessor method. + // + // initializers: + // An array of System.Linq.Expressions.ElementInit objects to use to populate + // the System.Linq.Expressions.MemberListBinding.Initializers collection. + // + // Returns: + // A System.Linq.Expressions.MemberListBinding that has the System.Linq.Expressions.MemberBinding.BindingType + // property equal to System.Linq.Expressions.MemberBindingType.ListBinding, + // the System.Linq.Expressions.MemberBinding.Member property set to the System.Reflection.MemberInfo + // that represents the property accessed in propertyAccessor, and System.Linq.Expressions.MemberListBinding.Initializers + // populated with the elements of initializers. + // + // Exceptions: + // System.ArgumentNullException: + // propertyAccessor is null. -or- One or more elements of initializers is null. + // + // System.ArgumentException: + // propertyAccessor does not represent a property accessor method. -or- The + // System.Reflection.PropertyInfo.PropertyType of the property that the method + // represented by propertyAccessor accesses does not implement System.Collections.IEnumerable. + [Pure] + public static MemberListBinding ListBind(MethodInfo propertyAccessor, params ElementInit[] initializers) + { + Contract.Requires(propertyAccessor != null); + Contract.Requires(initializers != null); + Contract.Requires(initializers.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(MemberListBinding); + } + + // + // Summary: + // Creates a System.Linq.Expressions.ListInitExpression that uses specified + // System.Linq.Expressions.ElementInit objects to initialize a collection. + // + // Parameters: + // newExpression: + // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression + // property equal to. + // + // initializers: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.ElementInit + // objects to use to populate the System.Linq.Expressions.ListInitExpression.Initializers + // collection. + // + // Returns: + // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ListInit and the + // System.Linq.Expressions.ListInitExpression.NewExpression and System.Linq.Expressions.ListInitExpression.Initializers + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // newExpression or initializers is null. -or- One or more elements of initializers + // is null. + // + // System.ArgumentException: + // newExpression.Type does not implement System.Collections.IEnumerable. + [Pure] + public static ListInitExpression ListInit(NewExpression newExpression, IEnumerable initializers) + { + Contract.Requires(newExpression != null); + Contract.Requires(initializers != null); + Contract.Ensures(Contract.Result() != null); + return default(ListInitExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.ListInitExpression that uses a method named + // "Add" to add elements to a collection. + // + // Parameters: + // newExpression: + // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression + // property equal to. + // + // initializers: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression + // objects to use to populate the System.Linq.Expressions.ListInitExpression.Initializers + // collection. + // + // Returns: + // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ListInit and the + // System.Linq.Expressions.ListInitExpression.NewExpression property set to + // the specified value. + // + // Exceptions: + // System.ArgumentNullException: + // newExpression or initializers is null. -or- One or more elements of initializers + // is null. + // + // System.ArgumentException: + // newExpression.Type does not implement System.Collections.IEnumerable. + // + // System.InvalidOperationException: + // There is no instance method named "Add" (case insensitive) declared in newExpression.Type + // or its base type. -or- The add method on newExpression.Type or its base + // type does not take exactly one argument. -or- The type represented by the + // System.Linq.Expressions.Expression.Type property of the first element of + // initializers is not assignable to the argument type of the add method on + // newExpression.Type or its base type. -or- More than one argument-compatible + // method named "Add" (case-insensitive) exists on newExpression.Type and/or + // its base type. + [Pure] + public static ListInitExpression ListInit(NewExpression newExpression, IEnumerable initializers) + { + Contract.Requires(newExpression != null); + Contract.Requires(initializers != null); + Contract.Ensures(Contract.Result() != null); + return default(ListInitExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.ListInitExpression that uses specified // System.Linq.Expressions.ElementInit objects to initialize a collection. // // Parameters: - // newExpression: - // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression - // property equal to. + // newExpression: + // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression + // property equal to. + // + // initializers: + // An array of System.Linq.Expressions.ElementInit objects to use to populate + // the System.Linq.Expressions.ListInitExpression.Initializers collection. + // + // Returns: + // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ListInit and the + // System.Linq.Expressions.ListInitExpression.NewExpression and System.Linq.Expressions.ListInitExpression.Initializers + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // newExpression or initializers is null. -or- One or more elements of initializers + // is null. + // + // System.ArgumentException: + // newExpression.Type does not implement System.Collections.IEnumerable. + [Pure] + public static ListInitExpression ListInit(NewExpression newExpression, params ElementInit[] initializers) + { + Contract.Requires(newExpression != null); + Contract.Requires(initializers != null); + Contract.Requires(initializers.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(ListInitExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.ListInitExpression that uses a method named + // "Add" to add elements to a collection. + // + // Parameters: + // newExpression: + // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression + // property equal to. + // + // initializers: + // An array of System.Linq.Expressions.Expression objects to use to populate + // the System.Linq.Expressions.ListInitExpression.Initializers collection. + // + // Returns: + // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ListInit and the + // System.Linq.Expressions.ListInitExpression.NewExpression property set to + // the specified value. + // + // Exceptions: + // System.ArgumentNullException: + // newExpression or initializers is null. -or- One or more elements of initializers + // is null. + // + // System.ArgumentException: + // newExpression.Type does not implement System.Collections.IEnumerable. + // + // System.InvalidOperationException: + // There is no instance method named "Add" (case insensitive) declared in newExpression.Type + // or its base type. -or- The add method on newExpression.Type or its base + // type does not take exactly one argument. -or- The type represented by the + // System.Linq.Expressions.Expression.Type property of the first element of + // initializers is not assignable to the argument type of the add method on + // newExpression.Type or its base type. -or- More than one argument-compatible + // method named "Add" (case-insensitive) exists on newExpression.Type and/or + // its base type. + [Pure] + public static ListInitExpression ListInit(NewExpression newExpression, params Expression[] initializers) + { + Contract.Requires(newExpression != null); + Contract.Requires(initializers != null); + Contract.Requires(initializers.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(ListInitExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.ListInitExpression that uses a specified + // method to add elements to a collection. + // + // Parameters: + // newExpression: + // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression + // property equal to. + // + // addMethod: + // A System.Reflection.MethodInfo that represents an instance method named "Add" + // (case insensitive), that adds an element to a collection. + // + // initializers: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression + // objects to use to populate the System.Linq.Expressions.ListInitExpression.Initializers + // collection. + // + // Returns: + // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ListInit and the + // System.Linq.Expressions.ListInitExpression.NewExpression property set to + // the specified value. + // + // Exceptions: + // System.ArgumentNullException: + // newExpression or initializers is null. -or- One or more elements of initializers + // is null. + // + // System.ArgumentException: + // newExpression.Type does not implement System.Collections.IEnumerable. -or- + // addMethod is not null and it does not represent an instance method named + // "Add" (case insensitive) that takes exactly one argument. -or- addMethod + // is not null and the type represented by the System.Linq.Expressions.Expression.Type + // property of one or more elements of initializers is not assignable to the + // argument type of the method that addMethod represents. + // + // System.InvalidOperationException: + // addMethod is null and no instance method named "Add" that takes one type-compatible + // argument exists on newExpression.Type or its base type. + [Pure] + public static ListInitExpression ListInit(NewExpression newExpression, MethodInfo addMethod, IEnumerable initializers) + { + Contract.Requires(newExpression != null); + Contract.Requires(initializers != null); + Contract.Ensures(Contract.Result() != null); + return default(ListInitExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.ListInitExpression that uses a specified + // method to add elements to a collection. + // + // Parameters: + // newExpression: + // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression + // property equal to. + // + // addMethod: + // A System.Reflection.MethodInfo that represents an instance method that takes + // one argument, that adds an element to a collection. + // + // initializers: + // An array of System.Linq.Expressions.Expression objects to use to populate + // the System.Linq.Expressions.ListInitExpression.Initializers collection. + // + // Returns: + // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ListInit and the + // System.Linq.Expressions.ListInitExpression.NewExpression property set to + // the specified value. + // + // Exceptions: + // System.ArgumentNullException: + // newExpression or initializers is null. -or- One or more elements of initializers + // is null. + // + // System.ArgumentException: + // newExpression.Type does not implement System.Collections.IEnumerable. -or- + // addMethod is not null and it does not represent an instance method named + // "Add" (case insensitive) that takes exactly one argument. -or- addMethod + // is not null and the type represented by the System.Linq.Expressions.Expression.Type + // property of one or more elements of initializers is not assignable to the + // argument type of the method that addMethod represents. + // + // System.InvalidOperationException: + // addMethod is null and no instance method named "Add" that takes one type-compatible + // argument exists on newExpression.Type or its base type. + [Pure] + public static ListInitExpression ListInit(NewExpression newExpression, MethodInfo addMethod, params Expression[] initializers) + { + Contract.Requires(newExpression != null); + Contract.Requires(initializers != null); + Contract.Requires(initializers.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(ListInitExpression); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.LoopExpression with the given body. + // + // Parameters: + // body: + // The body of the loop. + // + // Returns: + // The created System.Linq.Expressions.LoopExpression. + [Pure] + public static LoopExpression Loop(Expression body) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LoopExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.LoopExpression with the given body and break + // target. + // + // Parameters: + // body: + // The body of the loop. + // + // break: + // The break target used by the loop body. + // + // Returns: + // The created System.Linq.Expressions.LoopExpression. + [Pure] + public static LoopExpression Loop(Expression body, LabelTarget @break) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(LoopExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.LoopExpression with the given body. + // + // Parameters: + // body: + // The body of the loop. + // + // break: + // The break target used by the loop body. + // + // continue: + // The continue target used by the loop body. + // + // Returns: + // The created System.Linq.Expressions.LoopExpression. + [Pure] + public static LoopExpression Loop(Expression body, LabelTarget @break, LabelTarget @continue) + { + Contract.Requires(body != null); + Contract.Requires(@continue == null || @continue.Type == typeof(void)); + Contract.Ensures(Contract.Result() != null); + return default(LoopExpression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression, given the left and right + // operands, by calling an appropriate factory method. + // + // Parameters: + // binaryType: + // The System.Linq.Expressions.ExpressionType that specifies the type of binary + // operation. + // + // left: + // An System.Linq.Expressions.Expression that represents the left operand. + // + // right: + // An System.Linq.Expressions.Expression that represents the right operand. + // + // Returns: + // The System.Linq.Expressions.BinaryExpression that results from calling the + // appropriate factory method. + // + // Exceptions: + // System.ArgumentException: + // binaryType does not correspond to a binary expression node. + // + // System.ArgumentNullException: + // left or right is null. + [Pure] + public static BinaryExpression MakeBinary(ExpressionType binaryType, Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression, given the left operand, + // right operand and implementing method, by calling the appropriate factory + // method. + // + // Parameters: + // binaryType: + // The System.Linq.Expressions.ExpressionType that specifies the type of binary + // operation. + // + // left: + // An System.Linq.Expressions.Expression that represents the left operand. + // + // right: + // An System.Linq.Expressions.Expression that represents the right operand. + // + // liftToNull: + // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; + // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. + // + // method: + // A System.Reflection.MethodInfo that specifies the implementing method. + // + // Returns: + // The System.Linq.Expressions.BinaryExpression that results from calling the + // appropriate factory method. + // + // Exceptions: + // System.ArgumentException: + // binaryType does not correspond to a binary expression node. + // + // System.ArgumentNullException: + // left or right is null. + [Pure] + public static BinaryExpression MakeBinary(ExpressionType binaryType, Expression left, Expression right, bool liftToNull, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression, given the left operand, + // right operand, implementing method and type conversion function, by calling + // the appropriate factory method. + // + // Parameters: + // binaryType: + // The System.Linq.Expressions.ExpressionType that specifies the type of binary + // operation. + // + // left: + // An System.Linq.Expressions.Expression that represents the left operand. + // + // right: + // An System.Linq.Expressions.Expression that represents the right operand. + // + // liftToNull: + // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; + // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. + // + // method: + // A System.Reflection.MethodInfo that specifies the implementing method. + // + // conversion: + // A System.Linq.Expressions.LambdaExpression that represents a type conversion + // function. This parameter is used only if binaryType is System.Linq.Expressions.ExpressionType.Coalesce. + // + // Returns: + // The System.Linq.Expressions.BinaryExpression that results from calling the + // appropriate factory method. + // + // Exceptions: + // System.ArgumentException: + // binaryType does not correspond to a binary expression node. + // + // System.ArgumentNullException: + // left or right is null. + [Pure] + public static BinaryExpression MakeBinary(ExpressionType binaryType, Expression left, Expression right, bool liftToNull, MethodInfo method, LambdaExpression conversion) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.CatchBlock representing a catch statement with + // the specified elements. + // + // Parameters: + // type: + // The System.Linq.Expressions.Expression.Type of System.Exception this System.Linq.Expressions.CatchBlock + // will handle. + // + // variable: + // A System.Linq.Expressions.ParameterExpression representing a reference to the + // System.Exception object caught by this handler. + // + // body: + // The body of the catch statement. + // + // filter: + // The body of the System.Exception filter. + // + // Returns: + // The created System.Linq.Expressions.CatchBlock. + [Pure] + public static CatchBlock MakeCatchBlock(Type type, ParameterExpression variable, Expression body, Expression filter) + { + Contract.Requires(type != null); + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(CatchBlock); + } +#endif + +#if NETFRAMEWORK_4_0 + // + // Summary: + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder + // and one argument. + // + // Parameters: + // delegateType: + // The type of the delegate used by the System.Runtime.CompilerServices.CallSite. + // + // binder: + // The runtime binder for the dynamic operation. + // + // arg0: + // The argument to the dynamic operation. + // + // Returns: + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.DelegateType, + // System.Linq.Expressions.DynamicExpression.Binder, and System.Linq.Expressions.DynamicExpression.Arguments + // set to the specified values. + [Pure] + public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0) + { + Contract.Requires(delegateType != null); + Contract.Requires(binder != null); + Contract.Requires(arg0 != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder. + // + // Parameters: + // delegateType: + // The type of the delegate used by the System.Runtime.CompilerServices.CallSite. + // + // binder: + // The runtime binder for the dynamic operation. + // + // arguments: + // The arguments to the dynamic operation. + // + // Returns: + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.DelegateType, + // System.Linq.Expressions.DynamicExpression.Binder, and System.Linq.Expressions.DynamicExpression.Arguments + // set to the specified values. + [Pure] + public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, IEnumerable arguments) + { + Contract.Requires(delegateType != null); + Contract.Requires(binder != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder. + // + // Parameters: + // delegateType: + // The type of the delegate used by the System.Runtime.CompilerServices.CallSite. + // + // binder: + // The runtime binder for the dynamic operation. + // + // arguments: + // The arguments to the dynamic operation. + // + // Returns: + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.DelegateType, + // System.Linq.Expressions.DynamicExpression.Binder, and System.Linq.Expressions.DynamicExpression.Arguments + // set to the specified values. + [Pure] + public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, params Expression[] arguments) + { + Contract.Requires(delegateType != null); + Contract.Requires(binder != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder + // and two arguments. + // + // Parameters: + // delegateType: + // The type of the delegate used by the System.Runtime.CompilerServices.CallSite. + // + // binder: + // The runtime binder for the dynamic operation. + // + // arg0: + // The first argument to the dynamic operation. + // + // arg1: + // The second argument to the dynamic operation. + // + // Returns: + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.DelegateType, + // System.Linq.Expressions.DynamicExpression.Binder, and System.Linq.Expressions.DynamicExpression.Arguments + // set to the specified values. + [Pure] + public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1) + { + Contract.Requires(delegateType != null); + Contract.Requires(binder != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder + // and three arguments. + // + // Parameters: + // delegateType: + // The type of the delegate used by the System.Runtime.CompilerServices.CallSite. + // + // binder: + // The runtime binder for the dynamic operation. + // + // arg0: + // The first argument to the dynamic operation. + // + // arg1: + // The second argument to the dynamic operation. + // + // arg2: + // The third argument to the dynamic operation. + // + // Returns: + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.DelegateType, + // System.Linq.Expressions.DynamicExpression.Binder, and System.Linq.Expressions.DynamicExpression.Arguments + // set to the specified values. + [Pure] + public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2) + { + Contract.Requires(delegateType != null); + Contract.Requires(binder != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.DynamicExpression that represents a dynamic + // operation bound by the provided System.Runtime.CompilerServices.CallSiteBinder + // and four arguments. + // + // Parameters: + // delegateType: + // The type of the delegate used by the System.Runtime.CompilerServices.CallSite. + // + // binder: + // The runtime binder for the dynamic operation. + // + // arg0: + // The first argument to the dynamic operation. + // + // arg1: + // The second argument to the dynamic operation. + // + // arg2: + // The third argument to the dynamic operation. + // + // arg3: + // The fourth argument to the dynamic operation. + // + // Returns: + // A System.Linq.Expressions.DynamicExpression that has System.Linq.Expressions.Expression.NodeType + // equal to System.Linq.Expressions.ExpressionType.Dynamic and has the System.Linq.Expressions.DynamicExpression.DelegateType, + // System.Linq.Expressions.DynamicExpression.Binder, and System.Linq.Expressions.DynamicExpression.Arguments + // set to the specified values. + [Pure] + public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2, Expression arg3) + { + Contract.Requires(delegateType != null); + Contract.Requires(binder != null); + Contract.Requires(arg0 != null); + Contract.Requires(arg1 != null); + Contract.Requires(arg2 != null); + Contract.Requires(arg3 != null); + Contract.Ensures(Contract.Result() != null); + return default(DynamicExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a jump of the specified + // System.Linq.Expressions.GotoExpressionKind. The value passed to the label upon + // jumping can also be specified. + // + // Parameters: + // kind: + // The System.Linq.Expressions.GotoExpressionKind of the System.Linq.Expressions.GotoExpression. + // + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // value: + // The value that will be passed to the associated label upon jumping. + // + // type: + // An System.Type to set the System.Linq.Expressions.Expression.Type property equal + // to. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to kind, the System.Linq.Expressions.GotoExpression.Target property set + // to target, the System.Linq.Expressions.Expression.Type property set to type, + // and value to be passed to the target label upon jumping. + [Pure] + public static GotoExpression MakeGoto(GotoExpressionKind kind, LabelTarget target, Expression value, Type type) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates an System.Linq.Expressions.IndexExpression that represents accessing + // an indexed property in an object. + // + // Parameters: + // instance: + // The object to which the property belongs. It should be null if the property is + // static (shared in Visual Basic). + // + // indexer: + // An System.Linq.Expressions.Expression representing the property to index. + // + // arguments: + // An IEnumerable (IEnumerable (Of Expression) in Visual Basic) that + // contains the arguments that will be used to index the property. + // + // Returns: + // The created System.Linq.Expressions.IndexExpression. + [Pure] + public static IndexExpression MakeIndex(Expression instance, PropertyInfo indexer, IEnumerable arguments) + { + Contract.Ensures(Contract.Result() != null); + return default(IndexExpression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.MemberExpression that represents accessing + // either a field or a property. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression that represents the object that the + // member belongs to. + // + // member: + // The System.Reflection.MemberInfo that describes the field or property to + // be accessed. + // + // Returns: + // The System.Linq.Expressions.MemberExpression that results from calling the + // appropriate factory method. + // + // Exceptions: + // System.ArgumentNullException: + // expression or member is null. + // + // System.ArgumentException: + // member does not represent a field or property. + [Pure] + public static MemberExpression MakeMemberAccess(Expression expression, MemberInfo member) + { + Contract.Requires(expression != null); + Contract.Requires(member != null); + Contract.Requires(member is FieldInfo || member is PropertyInfo); + Contract.Ensures(Contract.Result() != null); + return default(MemberExpression); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.TryExpression representing a try block with + // the specified elements. + // + // Parameters: + // type: + // The result type of the try expression. If null, bodh and all handlers must have + // identical type. + // + // body: + // The body of the try block. + // + // finally: + // The body of the finally block. Pass null if the try block has no finally block + // associated with it. + // + // fault: + // The body of the fault block. Pass null if the try block has no fault block associated + // with it. + // + // handlers: + // A collection of System.Linq.Expressions.CatchBlocks representing the catch statements + // to be associated with the try block. + // + // Returns: + // The created System.Linq.Expressions.TryExpression. + [Pure] + public static TryExpression MakeTry(Type type, Expression body, Expression @finally, Expression fault, IEnumerable handlers) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); + return default(TryExpression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression, given an operand, by calling + // the appropriate factory method. + // + // Parameters: + // unaryType: + // The System.Linq.Expressions.ExpressionType that specifies the type of unary + // operation. + // + // operand: + // An System.Linq.Expressions.Expression that represents the operand. + // + // type: + // The System.Type that specifies the type to be converted to (pass null if + // not applicable). + // + // Returns: + // The System.Linq.Expressions.UnaryExpression that results from calling the + // appropriate factory method. + // + // Exceptions: + // System.ArgumentException: + // unaryType does not correspond to a unary expression node. + // + // System.ArgumentNullException: + // operand is null. + [Pure] + public static UnaryExpression MakeUnary(ExpressionType unaryType, Expression operand, Type type) + { + Contract.Requires(operand != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression, given an operand and implementing + // method, by calling the appropriate factory method. + // + // Parameters: + // unaryType: + // The System.Linq.Expressions.ExpressionType that specifies the type of unary + // operation. + // + // operand: + // An System.Linq.Expressions.Expression that represents the operand. + // + // type: + // The System.Type that specifies the type to be converted to (pass null if + // not applicable). + // + // method: + // The System.Reflection.MethodInfo that represents the implementing method. + // + // Returns: + // The System.Linq.Expressions.UnaryExpression that results from calling the + // appropriate factory method. + // + // Exceptions: + // System.ArgumentException: + // unaryType does not correspond to a unary expression node. + // + // System.ArgumentNullException: + // operand is null. + [Pure] + public static UnaryExpression MakeUnary(ExpressionType unaryType, Expression operand, Type type, MethodInfo method) + { + Contract.Requires(operand != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.MemberMemberBinding that represents the + // recursive initialization of members of a field or property. + // + // Parameters: + // member: + // The System.Reflection.MemberInfo to set the System.Linq.Expressions.MemberBinding.Member + // property equal to. + // + // bindings: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.MemberBinding + // objects to use to populate the System.Linq.Expressions.MemberMemberBinding.Bindings + // collection. + // + // Returns: + // A System.Linq.Expressions.MemberMemberBinding that has the System.Linq.Expressions.MemberBinding.BindingType + // property equal to System.Linq.Expressions.MemberBindingType.MemberBinding + // and the System.Linq.Expressions.MemberBinding.Member and System.Linq.Expressions.MemberMemberBinding.Bindings + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // member or bindings is null. + // + // System.ArgumentException: + // member does not represent a field or property. -or- The System.Linq.Expressions.MemberBinding.Member + // property of an element of bindings does not represent a member of the type + // of the field or property that member represents. + [Pure] + public static MemberMemberBinding MemberBind(MemberInfo member, IEnumerable bindings) + { + Contract.Requires(member != null); + Contract.Requires(bindings != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberMemberBinding); + } + // + // Summary: + // Creates a System.Linq.Expressions.MemberMemberBinding that represents the + // recursive initialization of members of a field or property. + // + // Parameters: + // member: + // The System.Reflection.MemberInfo to set the System.Linq.Expressions.MemberBinding.Member + // property equal to. + // + // bindings: + // An array of System.Linq.Expressions.MemberBinding objects to use to populate + // the System.Linq.Expressions.MemberMemberBinding.Bindings collection. + // + // Returns: + // A System.Linq.Expressions.MemberMemberBinding that has the System.Linq.Expressions.MemberBinding.BindingType + // property equal to System.Linq.Expressions.MemberBindingType.MemberBinding + // and the System.Linq.Expressions.MemberBinding.Member and System.Linq.Expressions.MemberMemberBinding.Bindings + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // member or bindings is null. + // + // System.ArgumentException: + // member does not represent a field or property. -or- The System.Linq.Expressions.MemberBinding.Member + // property of an element of bindings does not represent a member of the type + // of the field or property that member represents. + [Pure] + public static MemberMemberBinding MemberBind(MemberInfo member, params MemberBinding[] bindings) + { + Contract.Requires(member != null); + Contract.Requires(bindings != null); + Contract.Requires(bindings.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(MemberMemberBinding); + } + // + // Summary: + // Creates a System.Linq.Expressions.MemberMemberBinding that represents the + // recursive initialization of members of a member that is accessed by using + // a property accessor method. + // + // Parameters: + // propertyAccessor: + // The System.Reflection.MethodInfo that represents a property accessor method. + // + // bindings: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.MemberBinding + // objects to use to populate the System.Linq.Expressions.MemberMemberBinding.Bindings + // collection. + // + // Returns: + // A System.Linq.Expressions.MemberMemberBinding that has the System.Linq.Expressions.MemberBinding.BindingType + // property equal to System.Linq.Expressions.MemberBindingType.MemberBinding, + // the System.Linq.Expressions.MemberBinding.Member property set to the System.Reflection.PropertyInfo + // that represents the property accessed in propertyAccessor, and System.Linq.Expressions.MemberMemberBinding.Bindings + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // propertyAccessor or bindings is null. + // + // System.ArgumentException: + // propertyAccessor does not represent a property accessor method. -or- The + // System.Linq.Expressions.MemberBinding.Member property of an element of bindings + // does not represent a member of the type of the property accessed by the method + // that propertyAccessor represents. + [Pure] + public static MemberMemberBinding MemberBind(MethodInfo propertyAccessor, IEnumerable bindings) + { + Contract.Requires(propertyAccessor != null); + Contract.Requires(bindings != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberMemberBinding); + } + // + // Summary: + // Creates a System.Linq.Expressions.MemberMemberBinding that represents the + // recursive initialization of members of a member that is accessed by using + // a property accessor method. + // + // Parameters: + // propertyAccessor: + // The System.Reflection.MethodInfo that represents a property accessor method. + // + // bindings: + // An array of System.Linq.Expressions.MemberBinding objects to use to populate + // the System.Linq.Expressions.MemberMemberBinding.Bindings collection. + // + // Returns: + // A System.Linq.Expressions.MemberMemberBinding that has the System.Linq.Expressions.MemberBinding.BindingType + // property equal to System.Linq.Expressions.MemberBindingType.MemberBinding, + // the System.Linq.Expressions.MemberBinding.Member property set to the System.Reflection.PropertyInfo + // that represents the property accessed in propertyAccessor, and System.Linq.Expressions.MemberMemberBinding.Bindings + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // propertyAccessor or bindings is null. + // + // System.ArgumentException: + // propertyAccessor does not represent a property accessor method. -or- The + // System.Linq.Expressions.MemberBinding.Member property of an element of bindings + // does not represent a member of the type of the property accessed by the method + // that propertyAccessor represents. + [Pure] + public static MemberMemberBinding MemberBind(MethodInfo propertyAccessor, params MemberBinding[] bindings) + { + Contract.Requires(propertyAccessor != null); + Contract.Requires(bindings != null); + Contract.Requires(bindings.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(MemberMemberBinding); + } + + // + // Summary: + // Creates a System.Linq.Expressions.MemberInitExpression. + // + // Parameters: + // newExpression: + // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.MemberInitExpression.NewExpression + // property equal to. + // + // bindings: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.MemberBinding + // objects to use to populate the System.Linq.Expressions.MemberInitExpression.Bindings + // collection. + // + // Returns: + // A System.Linq.Expressions.MemberInitExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MemberInit and the + // System.Linq.Expressions.MemberInitExpression.NewExpression and System.Linq.Expressions.MemberInitExpression.Bindings + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // newExpression or bindings is null. + // + // System.ArgumentException: + // The System.Linq.Expressions.MemberBinding.Member property of an element of + // bindings does not represent a member of the type that newExpression.Type + // represents. + [Pure] + public static MemberInitExpression MemberInit(NewExpression newExpression, IEnumerable bindings) + { + Contract.Requires(newExpression != null); + Contract.Requires(bindings != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberInitExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.MemberInitExpression. + // + // Parameters: + // newExpression: + // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.MemberInitExpression.NewExpression + // property equal to. + // + // bindings: + // An array of System.Linq.Expressions.MemberBinding objects to use to populate + // the System.Linq.Expressions.MemberInitExpression.Bindings collection. + // + // Returns: + // A System.Linq.Expressions.MemberInitExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MemberInit and the + // System.Linq.Expressions.MemberInitExpression.NewExpression and System.Linq.Expressions.MemberInitExpression.Bindings + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // newExpression or bindings is null. + // + // System.ArgumentException: + // The System.Linq.Expressions.MemberBinding.Member property of an element of + // bindings does not represent a member of the type that newExpression.Type + // represents. + [Pure] + public static MemberInitExpression MemberInit(NewExpression newExpression, params MemberBinding[] bindings) + { + Contract.Requires(newExpression != null); + Contract.Requires(bindings != null); + Contract.Requires(bindings.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(MemberInitExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // remainder operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Modulo and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the + // specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.InvalidOperationException: + // The modulus operator is not defined for left.Type and right.Type. + [Pure] + public static BinaryExpression Modulo(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // remainder operation. The implementing method can be specified. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Modulo and the System.Linq.Expressions.BinaryExpression.Left, + // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the modulus operator is not defined for left.Type and + // right.Type. + [Pure] + public static BinaryExpression Modulo(Expression left, Expression right, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a remainder + // assignment operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ModuloAssign and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + [Pure] + public static BinaryExpression ModuloAssign(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a remainder + // assignment operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ModuloAssign and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the specified + // values. + [Pure] + public static BinaryExpression ModuloAssign(Expression left, Expression right, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a remainder + // assignment operation. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.ModuloAssign and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion + // properties set to the specified values. + [Pure] + public static BinaryExpression ModuloAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // multiplication operation that does not have overflow checking. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Multiply and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.InvalidOperationException: + // The multiplication operator is not defined for left.Type and right.Type. + [Pure] + public static BinaryExpression Multiply(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // multiplication operation that does not have overflow checking and for which + // the implementing method is specified. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Multiply and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the + // specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the multiplication operator is not defined for left.Type + // and right.Type. + [Pure] + public static BinaryExpression Multiply(Expression left, Expression right, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a multiplication + // assignment operation that does not have overflow checking. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MultiplyAssign and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + [Pure] + public static BinaryExpression MultiplyAssign(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a multiplication + // assignment operation that does not have overflow checking. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MultiplyAssign and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the specified + // values. + [Pure] + public static BinaryExpression MultiplyAssign(Expression left, Expression right, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a multiplication + // assignment operation that does not have overflow checking. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MultiplyAssign and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion + // properties set to the specified values. + [Pure] + public static BinaryExpression MultiplyAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a multiplication + // assignment operation that has overflow checking. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MultiplyAssignChecked + // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + [Pure] + public static BinaryExpression MultiplyAssignChecked(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a multiplication + // assignment operation that has overflow checking. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MultiplyAssignChecked + // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the specified + // values. + [Pure] + public static BinaryExpression MultiplyAssignChecked(Expression left, Expression right, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a multiplication + // assignment operation that has overflow checking. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MultiplyAssignChecked + // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion + // properties set to the specified values. + [Pure] + public static BinaryExpression MultiplyAssignChecked(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // multiplication operation that has overflow checking. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MultiplyChecked + // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.InvalidOperationException: + // The multiplication operator is not defined for left.Type and right.Type. + [Pure] + public static BinaryExpression MultiplyChecked(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // multiplication operation that has overflow checking. The implementing method + // can be specified. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MultiplyChecked + // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the + // specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the multiplication operator is not defined for left.Type + // and right.Type. + [Pure] + public static BinaryExpression MultiplyChecked(Expression left, Expression right, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents an arithmetic + // negation operation. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // property equal to. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Negate and the System.Linq.Expressions.UnaryExpression.Operand + // property set to the specified value. + // + // Exceptions: + // System.ArgumentNullException: + // expression is null. + // + // System.InvalidOperationException: + // The unary minus operator is not defined for expression.Type. + [Pure] + public static UnaryExpression Negate(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents an arithmetic + // negation operation. The implementing method can be specified. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.UnaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Negate and the System.Linq.Expressions.UnaryExpression.Operand + // and System.Linq.Expressions.UnaryExpression.Method properties set to the + // specified values. + // + // Exceptions: + // System.ArgumentNullException: + // expression is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly one argument. + // + // System.InvalidOperationException: + // method is null and the unary minus operator is not defined for expression.Type. + // -or- expression.Type (or its corresponding non-nullable type if it is a + // nullable value type) is not assignable to the argument type of the method + // represented by method. + [Pure] + public static UnaryExpression Negate(Expression expression, MethodInfo method) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents an arithmetic + // negation operation that has overflow checking. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // property equal to. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.NegateChecked and + // the System.Linq.Expressions.UnaryExpression.Operand property set to the specified + // value. + // + // Exceptions: + // System.ArgumentNullException: + // expression is null. + // + // System.InvalidOperationException: + // The unary minus operator is not defined for expression.Type. + [Pure] + public static UnaryExpression NegateChecked(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents an arithmetic + // negation operation that has overflow checking. The implementing method can + // be specified. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.UnaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.NegateChecked and + // the System.Linq.Expressions.UnaryExpression.Operand and System.Linq.Expressions.UnaryExpression.Method + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // expression is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly one argument. + // + // System.InvalidOperationException: + // method is null and the unary minus operator is not defined for expression.Type. + // -or- expression.Type (or its corresponding non-nullable type if it is a + // nullable value type) is not assignable to the argument type of the method + // represented by method. + [Pure] + public static UnaryExpression NegateChecked(Expression expression, MethodInfo method) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.NewExpression that represents calling the + // specified constructor that takes no arguments. + // + // Parameters: + // constructor: + // The System.Reflection.ConstructorInfo to set the System.Linq.Expressions.NewExpression.Constructor + // property equal to. + // + // Returns: + // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor + // property set to the specified value. + // + // Exceptions: + // System.ArgumentNullException: + // constructor is null. + // + // System.ArgumentException: + // The constructor that constructor represents has at least one parameter. + [Pure] + public static NewExpression New(ConstructorInfo constructor) + { + Contract.Requires(constructor != null); + Contract.Ensures(Contract.Result() != null); + return default(NewExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.NewExpression that represents calling the + // parameterless constructor of the specified type. + // + // Parameters: + // type: + // A System.Type that has a constructor that takes no arguments. + // + // Returns: + // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor + // property set to the System.Reflection.ConstructorInfo that represents the + // parameterless constructor of the specified type. + // + // Exceptions: + // System.ArgumentNullException: + // type is null. + // + // System.ArgumentException: + // The type that type represents does not have a parameterless constructor. + [Pure] + public static NewExpression New(Type type) + { + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(NewExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.NewExpression that represents calling the + // specified constructor with the specified arguments. + // + // Parameters: + // constructor: + // The System.Reflection.ConstructorInfo to set the System.Linq.Expressions.NewExpression.Constructor + // property equal to. + // + // arguments: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression + // objects to use to populate the System.Linq.Expressions.NewExpression.Arguments + // collection. + // + // Returns: + // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor + // and System.Linq.Expressions.NewExpression.Arguments properties set to the + // specified values. + // + // Exceptions: + // System.ArgumentNullException: + // constructor is null. -or- An element of arguments is null. + // + // System.ArgumentException: + // The arguments parameter does not contain the same number of elements as the + // number of parameters for the constructor that constructor represents. -or- + // The System.Linq.Expressions.Expression.Type property of an element of arguments + // is not assignable to the type of the corresponding parameter of the constructor + // that constructor represents. + [Pure] + public static NewExpression New(ConstructorInfo constructor, IEnumerable arguments) + { + Contract.Requires(constructor != null); + Contract.Ensures(Contract.Result() != null); + return default(NewExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.NewExpression that represents calling the + // specified constructor with the specified arguments. + // + // Parameters: + // constructor: + // The System.Reflection.ConstructorInfo to set the System.Linq.Expressions.NewExpression.Constructor + // property equal to. + // + // arguments: + // An array of System.Linq.Expressions.Expression objects to use to populate + // the System.Linq.Expressions.NewExpression.Arguments collection. + // + // Returns: + // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor + // and System.Linq.Expressions.NewExpression.Arguments properties set to the + // specified values. + // + // Exceptions: + // System.ArgumentNullException: + // constructor is null. -or- An element of arguments is null. + // + // System.ArgumentException: + // The length of arguments does match the number of parameters for the constructor + // that constructor represents. -or- The System.Linq.Expressions.Expression.Type + // property of an element of arguments is not assignable to the type of the + // corresponding parameter of the constructor that constructor represents. + [Pure] + public static NewExpression New(ConstructorInfo constructor, params Expression[] arguments) + { + Contract.Requires(constructor != null); + Contract.Ensures(Contract.Result() != null); + return default(NewExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.NewExpression that represents calling the + // specified constructor with the specified arguments. The members that access + // the constructor initialized fields are specified. + // + // Parameters: + // constructor: + // The System.Reflection.ConstructorInfo to set the System.Linq.Expressions.NewExpression.Constructor + // property equal to. + // + // arguments: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression + // objects to use to populate the System.Linq.Expressions.NewExpression.Arguments + // collection. + // + // members: + // An System.Collections.Generic.IEnumerable that contains System.Reflection.MemberInfo + // objects to use to populate the System.Linq.Expressions.NewExpression.Members + // collection. + // + // Returns: + // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor, + // System.Linq.Expressions.NewExpression.Arguments and System.Linq.Expressions.NewExpression.Members + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // constructor is null. -or- An element of arguments is null. -or- An element + // of members is null. + // + // System.ArgumentException: + // The arguments parameter does not contain the same number of elements as the + // number of parameters for the constructor that constructor represents. -or- + // The System.Linq.Expressions.Expression.Type property of an element of arguments + // is not assignable to the type of the corresponding parameter of the constructor + // that constructor represents. -or- The members parameter does not have the + // same number of elements as arguments. -or- An element of arguments has a + // System.Linq.Expressions.Expression.Type property that represents a type that + // is not assignable to the type of the member that is represented by the corresponding + // element of members. -or- An element of members represents a property that + // does not have a get accessor. + [Pure] + public static NewExpression New(ConstructorInfo constructor, IEnumerable arguments, IEnumerable members) + { + Contract.Requires(constructor != null); + Contract.Ensures(Contract.Result() != null); + return default(NewExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.NewExpression that represents calling the + // specified constructor with the specified arguments. The members that access + // the constructor initialized fields are specified as an array. + // + // Parameters: + // constructor: + // The System.Reflection.ConstructorInfo to set the System.Linq.Expressions.NewExpression.Constructor + // property equal to. + // + // arguments: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression + // objects to use to populate the System.Linq.Expressions.NewExpression.Arguments + // collection. + // + // members: + // An array of System.Reflection.MemberInfo objects to use to populate the System.Linq.Expressions.NewExpression.Members + // collection. + // + // Returns: + // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor, + // System.Linq.Expressions.NewExpression.Arguments and System.Linq.Expressions.NewExpression.Members + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // constructor is null. -or- An element of arguments is null. -or- An element + // of members is null. + // + // System.ArgumentException: + // The arguments parameter does not contain the same number of elements as the + // number of parameters for the constructor that constructor represents. -or- + // The System.Linq.Expressions.Expression.Type property of an element of arguments + // is not assignable to the type of the corresponding parameter of the constructor + // that constructor represents. -or- The members parameter does not have the + // same number of elements as arguments. -or- An element of arguments has a + // System.Linq.Expressions.Expression.Type property that represents a type that + // is not assignable to the type of the member that is represented by the corresponding + // element of members. -or- An element of members represents a property that + // does not have a get accessor. + [Pure] + public static NewExpression New(ConstructorInfo constructor, IEnumerable arguments, params MemberInfo[] members) + { + Contract.Requires(constructor != null); + Contract.Ensures(Contract.Result() != null); + return default(NewExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.NewArrayExpression that represents creating + // an array that has a specified rank. + // + // Parameters: + // type: + // A System.Type that represents the element type of the array. + // + // bounds: + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression + // objects to use to populate the System.Linq.Expressions.NewArrayExpression.Expressions + // collection. + // + // Returns: + // A System.Linq.Expressions.NewArrayExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.NewArrayBounds and + // the System.Linq.Expressions.NewArrayExpression.Expressions property set to + // the specified value. + // + // Exceptions: + // System.ArgumentNullException: + // type or bounds is null. -or- An element of bounds is null. + // + // System.ArgumentException: + // The System.Linq.Expressions.Expression.Type property of an element of bounds + // does not represent an integral type. + [Pure] + public static NewArrayExpression NewArrayBounds(Type type, IEnumerable bounds) + { + Contract.Requires(type != null); + Contract.Requires(bounds != null); + Contract.Ensures(Contract.Result() != null); + return default(NewArrayExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.NewArrayExpression that represents creating + // an array that has a specified rank. + // + // Parameters: + // type: + // A System.Type that represents the element type of the array. + // + // bounds: + // An array of System.Linq.Expressions.Expression objects to use to populate + // the System.Linq.Expressions.NewArrayExpression.Expressions collection. + // + // Returns: + // A System.Linq.Expressions.NewArrayExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.NewArrayBounds and + // the System.Linq.Expressions.NewArrayExpression.Expressions property set to + // the specified value. + // + // Exceptions: + // System.ArgumentNullException: + // type or bounds is null. -or- An element of bounds is null. + // + // System.ArgumentException: + // The System.Linq.Expressions.Expression.Type property of an element of bounds + // does not represent an integral type. + [Pure] + public static NewArrayExpression NewArrayBounds(Type type, params Expression[] bounds) + { + Contract.Requires(type != null); + Contract.Requires(bounds != null); + Contract.Requires(bounds.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(NewArrayExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.NewArrayExpression that represents creating + // a one-dimensional array and initializing it from a list of elements. + // + // Parameters: + // type: + // A System.Type that represents the element type of the array. // // initializers: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.ElementInit - // objects to use to populate the System.Linq.Expressions.ListInitExpression.Initializers + // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression + // objects to use to populate the System.Linq.Expressions.NewArrayExpression.Expressions // collection. // // Returns: - // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.ListInit and the - // System.Linq.Expressions.ListInitExpression.NewExpression and System.Linq.Expressions.ListInitExpression.Initializers - // properties set to the specified values. + // A System.Linq.Expressions.NewArrayExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.NewArrayInit and + // the System.Linq.Expressions.NewArrayExpression.Expressions property set to + // the specified value. // // Exceptions: // System.ArgumentNullException: - // newExpression or initializers is null. -or- One or more elements of initializers - // is null. + // type or initializers is null. -or- An element of initializers is null. // - // System.ArgumentException: - // newExpression.Type does not implement System.Collections.IEnumerable. + // System.InvalidOperationException: + // The System.Linq.Expressions.Expression.Type property of an element of initializers + // represents a type that is not assignable to the type that type represents. [Pure] - public static ListInitExpression ListInit(NewExpression newExpression, IEnumerable initializers) + public static NewArrayExpression NewArrayInit(Type type, IEnumerable initializers) { - Contract.Requires(newExpression != null); + Contract.Requires(type != null); Contract.Requires(initializers != null); - Contract.Ensures(Contract.Result() != null); - return default(ListInitExpression); + Contract.Ensures(Contract.Result() != null); + return default(NewArrayExpression); } // // Summary: - // Creates a System.Linq.Expressions.ListInitExpression that uses a method named - // "Add" to add elements to a collection. + // Creates a System.Linq.Expressions.NewArrayExpression that represents creating + // a one-dimensional array and initializing it from a list of elements. // // Parameters: - // newExpression: - // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression - // property equal to. + // type: + // A System.Type that represents the element type of the array. // // initializers: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression - // objects to use to populate the System.Linq.Expressions.ListInitExpression.Initializers - // collection. + // An array of System.Linq.Expressions.Expression objects to use to populate + // the System.Linq.Expressions.NewArrayExpression.Expressions collection. // // Returns: - // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.ListInit and the - // System.Linq.Expressions.ListInitExpression.NewExpression property set to + // A System.Linq.Expressions.NewArrayExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.NewArrayInit and + // the System.Linq.Expressions.NewArrayExpression.Expressions property set to // the specified value. // // Exceptions: // System.ArgumentNullException: - // newExpression or initializers is null. -or- One or more elements of initializers - // is null. + // type or initializers is null. -or- An element of initializers is null. + // + // System.InvalidOperationException: + // The System.Linq.Expressions.Expression.Type property of an element of initializers + // represents a type that is not assignable to the type type. + [Pure] + public static NewArrayExpression NewArrayInit(Type type, params Expression[] initializers) + { + Contract.Requires(type != null); + Contract.Requires(initializers != null); + Contract.Requires(initializers.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(NewArrayExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents a bitwise + // complement operation. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // property equal to. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Not and the System.Linq.Expressions.UnaryExpression.Operand + // property set to the specified value. + // + // Exceptions: + // System.ArgumentNullException: + // expression is null. + // + // System.InvalidOperationException: + // The unary not operator is not defined for expression.Type. + [Pure] + public static UnaryExpression Not(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents a bitwise + // complement operation. The implementing method can be specified. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.UnaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Not and the System.Linq.Expressions.UnaryExpression.Operand + // and System.Linq.Expressions.UnaryExpression.Method properties set to the + // specified values. + // + // Exceptions: + // System.ArgumentNullException: + // expression is null. // // System.ArgumentException: - // newExpression.Type does not implement System.Collections.IEnumerable. + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly one argument. // // System.InvalidOperationException: - // There is no instance method named "Add" (case insensitive) declared in newExpression.Type - // or its base type. -or- The add method on newExpression.Type or its base - // type does not take exactly one argument. -or- The type represented by the - // System.Linq.Expressions.Expression.Type property of the first element of - // initializers is not assignable to the argument type of the add method on - // newExpression.Type or its base type. -or- More than one argument-compatible - // method named "Add" (case-insensitive) exists on newExpression.Type and/or - // its base type. + // method is null and the unary not operator is not defined for expression.Type. + // -or- expression.Type (or its corresponding non-nullable type if it is a + // nullable value type) is not assignable to the argument type of the method + // represented by method. + [Pure] + public static UnaryExpression Not(Expression expression, MethodInfo method) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents an inequality + // comparison. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.NotEqual and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.InvalidOperationException: + // The inequality operator is not defined for left.Type and right.Type. + [Pure] + public static BinaryExpression NotEqual(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents an inequality + // comparison. The implementing method can be specified. + // + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // liftToNull: + // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; + // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.NotEqual and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.IsLiftedToNull, and System.Linq.Expressions.BinaryExpression.Method + // properties set to the specified values. + // + // Exceptions: + // System.ArgumentNullException: + // left or right is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the inequality operator is not defined for left.Type and + // right.Type. + [Pure] + public static BinaryExpression NotEqual(Expression left, Expression right, bool liftToNull, MethodInfo method) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Returns the expression representing the ones complement. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression. + // + // Returns: + // An instance of System.Linq.Expressions.UnaryExpression. + [Pure] + public static UnaryExpression OnesComplement(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + // + // Summary: + // Returns the expression representing the ones complement. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression. + // + // method: + // A System.Reflection.MethodInfo that represents the implementing method. + // + // Returns: + // An instance of System.Linq.Expressions.UnaryExpression. [Pure] - public static ListInitExpression ListInit(NewExpression newExpression, IEnumerable initializers) + public static UnaryExpression OnesComplement(Expression expression, MethodInfo method) { - Contract.Requires(newExpression != null); - Contract.Requires(initializers != null); - Contract.Ensures(Contract.Result() != null); - return default(ListInitExpression); + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.ListInitExpression that uses specified - // System.Linq.Expressions.ElementInit objects to initialize a collection. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // OR operation. // // Parameters: - // newExpression: - // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // initializers: - // An array of System.Linq.Expressions.ElementInit objects to use to populate - // the System.Linq.Expressions.ListInitExpression.Initializers collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // // Returns: - // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.ListInit and the - // System.Linq.Expressions.ListInitExpression.NewExpression and System.Linq.Expressions.ListInitExpression.Initializers - // properties set to the specified values. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Or and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the + // specified values. // // Exceptions: // System.ArgumentNullException: - // newExpression or initializers is null. -or- One or more elements of initializers - // is null. + // left or right is null. // - // System.ArgumentException: - // newExpression.Type does not implement System.Collections.IEnumerable. + // System.InvalidOperationException: + // The bitwise OR operator is not defined for left.Type and right.Type. [Pure] - public static ListInitExpression ListInit(NewExpression newExpression, params ElementInit[] initializers) + public static BinaryExpression Or(Expression left, Expression right) { - Contract.Requires(newExpression != null); - Contract.Requires(initializers != null); - Contract.Ensures(Contract.Result() != null); - return default(ListInitExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.ListInitExpression that uses a method named - // "Add" to add elements to a collection. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // OR operation. The implementing method can be specified. // // Parameters: - // newExpression: - // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // initializers: - // An array of System.Linq.Expressions.Expression objects to use to populate - // the System.Linq.Expressions.ListInitExpression.Initializers collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. // // Returns: - // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.ListInit and the - // System.Linq.Expressions.ListInitExpression.NewExpression property set to - // the specified value. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Or and the System.Linq.Expressions.BinaryExpression.Left, + // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method + // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: - // newExpression or initializers is null. -or- One or more elements of initializers - // is null. + // left or right is null. // // System.ArgumentException: - // newExpression.Type does not implement System.Collections.IEnumerable. + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. // // System.InvalidOperationException: - // There is no instance method named "Add" (case insensitive) declared in newExpression.Type - // or its base type. -or- The add method on newExpression.Type or its base - // type does not take exactly one argument. -or- The type represented by the - // System.Linq.Expressions.Expression.Type property of the first element of - // initializers is not assignable to the argument type of the add method on - // newExpression.Type or its base type. -or- More than one argument-compatible - // method named "Add" (case-insensitive) exists on newExpression.Type and/or - // its base type. + // method is null and the bitwise OR operator is not defined for left.Type and + // right.Type. [Pure] - public static ListInitExpression ListInit(NewExpression newExpression, params Expression[] initializers) + public static BinaryExpression Or(Expression left, Expression right, MethodInfo method) { - Contract.Requires(newExpression != null); - Contract.Requires(initializers != null); - Contract.Ensures(Contract.Result() != null); - return default(ListInitExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.ListInitExpression that uses a specified - // method to add elements to a collection. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // OR assignment operation. // // Parameters: - // newExpression: - // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // addMethod: - // A System.Reflection.MethodInfo that represents an instance method named "Add" - // (case insensitive), that adds an element to a collection. - // - // initializers: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression - // objects to use to populate the System.Linq.Expressions.ListInitExpression.Initializers - // collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // // Returns: - // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.ListInit and the - // System.Linq.Expressions.ListInitExpression.NewExpression property set to - // the specified value. - // - // Exceptions: - // System.ArgumentNullException: - // newExpression or initializers is null. -or- One or more elements of initializers - // is null. - // - // System.ArgumentException: - // newExpression.Type does not implement System.Collections.IEnumerable. -or- - // addMethod is not null and it does not represent an instance method named - // "Add" (case insensitive) that takes exactly one argument. -or- addMethod - // is not null and the type represented by the System.Linq.Expressions.Expression.Type - // property of one or more elements of initializers is not assignable to the - // argument type of the method that addMethod represents. - // - // System.InvalidOperationException: - // addMethod is null and no instance method named "Add" that takes one type-compatible - // argument exists on newExpression.Type or its base type. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.OrAssign and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the specified + // values. [Pure] - public static ListInitExpression ListInit(NewExpression newExpression, MethodInfo addMethod, IEnumerable initializers) + public static BinaryExpression OrAssign(Expression left, Expression right) { - Contract.Requires(newExpression != null); - Contract.Requires(initializers != null); - Contract.Ensures(Contract.Result() != null); - return default(ListInitExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.ListInitExpression that uses a specified - // method to add elements to a collection. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // OR assignment operation. // // Parameters: - // newExpression: - // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.ListInitExpression.NewExpression + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // addMethod: - // A System.Reflection.MethodInfo that represents an instance method that takes - // one argument, that adds an element to a collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // - // initializers: - // An array of System.Linq.Expressions.Expression objects to use to populate - // the System.Linq.Expressions.ListInitExpression.Initializers collection. + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. // // Returns: - // A System.Linq.Expressions.ListInitExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.ListInit and the - // System.Linq.Expressions.ListInitExpression.NewExpression property set to - // the specified value. - // - // Exceptions: - // System.ArgumentNullException: - // newExpression or initializers is null. -or- One or more elements of initializers - // is null. - // - // System.ArgumentException: - // newExpression.Type does not implement System.Collections.IEnumerable. -or- - // addMethod is not null and it does not represent an instance method named - // "Add" (case insensitive) that takes exactly one argument. -or- addMethod - // is not null and the type represented by the System.Linq.Expressions.Expression.Type - // property of one or more elements of initializers is not assignable to the - // argument type of the method that addMethod represents. - // - // System.InvalidOperationException: - // addMethod is null and no instance method named "Add" that takes one type-compatible - // argument exists on newExpression.Type or its base type. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.OrAssign and the System.Linq.Expressions.BinaryExpression.Left, + // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method + // properties set to the specified values. [Pure] - public static ListInitExpression ListInit(NewExpression newExpression, MethodInfo addMethod, params Expression[] initializers) + public static BinaryExpression OrAssign(Expression left, Expression right, MethodInfo method) { - Contract.Requires(newExpression != null); - Contract.Requires(initializers != null); - Contract.Ensures(Contract.Result() != null); - return default(ListInitExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression, given the left and right - // operands, by calling an appropriate factory method. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // OR assignment operation. // // Parameters: - // binaryType: - // The System.Linq.Expressions.ExpressionType that specifies the type of binary - // operation. - // // left: - // An System.Linq.Expressions.Expression that represents the left operand. + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. // // right: - // An System.Linq.Expressions.Expression that represents the right operand. + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // - // Returns: - // The System.Linq.Expressions.BinaryExpression that results from calling the - // appropriate factory method. + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. // - // Exceptions: - // System.ArgumentException: - // binaryType does not correspond to a binary expression node. + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. // - // System.ArgumentNullException: - // left or right is null. + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.OrAssign and the System.Linq.Expressions.BinaryExpression.Left, + // System.Linq.Expressions.BinaryExpression.Right, System.Linq.Expressions.BinaryExpression.Method, + // and System.Linq.Expressions.BinaryExpression.Conversion properties set to the + // specified values. [Pure] - public static BinaryExpression MakeBinary(ExpressionType binaryType, Expression left, Expression right) + public static BinaryExpression OrAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) { Contract.Requires(left != null); Contract.Requires(right != null); Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression, given the left operand, - // right operand and implementing method, by calling the appropriate factory - // method. + // Creates a System.Linq.Expressions.BinaryExpression that represents a conditional + // OR operation that evaluates the second operand only if it has to. // // Parameters: - // binaryType: - // The System.Linq.Expressions.ExpressionType that specifies the type of binary - // operation. - // - // left: - // An System.Linq.Expressions.Expression that represents the left operand. - // - // right: - // An System.Linq.Expressions.Expression that represents the right operand. - // - // liftToNull: - // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; - // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. // - // method: - // A System.Reflection.MethodInfo that specifies the implementing method. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // // Returns: - // The System.Linq.Expressions.BinaryExpression that results from calling the - // appropriate factory method. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.OrElse and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the + // specified values. // // Exceptions: - // System.ArgumentException: - // binaryType does not correspond to a binary expression node. - // // System.ArgumentNullException: // left or right is null. + // + // System.InvalidOperationException: + // The bitwise OR operator is not defined for left.Type and right.Type. -or- + // left.Type and right.Type are not the same Boolean type. [Pure] - public static BinaryExpression MakeBinary(ExpressionType binaryType, Expression left, Expression right, bool liftToNull, MethodInfo method) + public static BinaryExpression OrElse(Expression left, Expression right) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -3460,380 +8073,297 @@ public static BinaryExpression MakeBinary(ExpressionType binaryType, Expression } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression, given the left operand, - // right operand, implementing method and type conversion function, by calling - // the appropriate factory method. + // Creates a System.Linq.Expressions.BinaryExpression that represents a conditional + // OR operation that evaluates the second operand only if it has to. The implementing + // method can be specified. // // Parameters: - // binaryType: - // The System.Linq.Expressions.ExpressionType that specifies the type of binary - // operation. - // // left: - // An System.Linq.Expressions.Expression that represents the left operand. + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. // // right: - // An System.Linq.Expressions.Expression that represents the right operand. - // - // liftToNull: - // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; - // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // // method: - // A System.Reflection.MethodInfo that specifies the implementing method. - // - // conversion: - // A System.Linq.Expressions.LambdaExpression that represents a type conversion - // function. This parameter is used only if binaryType is System.Linq.Expressions.ExpressionType.Coalesce. + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. // // Returns: - // The System.Linq.Expressions.BinaryExpression that results from calling the - // appropriate factory method. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.OrElse and the System.Linq.Expressions.BinaryExpression.Left, + // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method + // properties set to the specified values. // // Exceptions: - // System.ArgumentException: - // binaryType does not correspond to a binary expression node. - // // System.ArgumentNullException: // left or right is null. + // + // System.ArgumentException: + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the bitwise OR operator is not defined for left.Type and + // right.Type. -or- method is null and left.Type and right.Type are not the + // same Boolean type. [Pure] - public static BinaryExpression MakeBinary(ExpressionType binaryType, Expression left, Expression right, bool liftToNull, MethodInfo method, LambdaExpression conversion) + public static BinaryExpression OrElse(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); Contract.Requires(right != null); Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.MemberExpression that represents accessing - // either a field or a property. + // Creates a System.Linq.Expressions.ParameterExpression node that can be used to + // identify a parameter or a variable in an expression tree. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression that represents the object that the - // member belongs to. - // - // member: - // The System.Reflection.MemberInfo that describes the field or property to - // be accessed. + // type: + // The type of the parameter or variable. // // Returns: - // The System.Linq.Expressions.MemberExpression that results from calling the - // appropriate factory method. - // - // Exceptions: - // System.ArgumentNullException: - // expression or member is null. - // - // System.ArgumentException: - // member does not represent a field or property. + // A System.Linq.Expressions.ParameterExpression node with the specified name and + // type. [Pure] - public static MemberExpression MakeMemberAccess(Expression expression, MemberInfo member) + public static ParameterExpression Parameter(Type type) { - Contract.Requires(expression != null); - Contract.Requires(member != null); - - Contract.Ensures(Contract.Result() != null); - return default(MemberExpression); + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(ParameterExpression); } +#endif // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression, given an operand, by calling - // the appropriate factory method. + // Creates a System.Linq.Expressions.ParameterExpression. // // Parameters: - // unaryType: - // The System.Linq.Expressions.ExpressionType that specifies the type of unary - // operation. - // - // operand: - // An System.Linq.Expressions.Expression that represents the operand. - // // type: - // The System.Type that specifies the type to be converted to (pass null if - // not applicable). + // A System.Type to set the System.Linq.Expressions.Expression.Type property + // equal to. + // + // name: + // The value to set the System.Linq.Expressions.ParameterExpression.Name property + // equal to. // // Returns: - // The System.Linq.Expressions.UnaryExpression that results from calling the - // appropriate factory method. + // A System.Linq.Expressions.ParameterExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Parameter and the + // System.Linq.Expressions.Expression.Type and System.Linq.Expressions.ParameterExpression.Name + // properties set to the specified values. // // Exceptions: - // System.ArgumentException: - // unaryType does not correspond to a unary expression node. - // // System.ArgumentNullException: - // operand is null. + // type is null. [Pure] - public static UnaryExpression MakeUnary(ExpressionType unaryType, Expression operand, Type type) + public static ParameterExpression Parameter(Type type, string name) { - Contract.Requires(operand != null); - Contract.Ensures(Contract.Result() != null); - return default(UnaryExpression); + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(ParameterExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression, given an operand and implementing - // method, by calling the appropriate factory method. + // Creates a System.Linq.Expressions.UnaryExpression that represents the assignment + // of the expression followed by a subsequent decrement by 1 of the original expression. // // Parameters: - // unaryType: - // The System.Linq.Expressions.ExpressionType that specifies the type of unary - // operation. - // - // operand: - // An System.Linq.Expressions.Expression that represents the operand. - // - // type: - // The System.Type that specifies the type to be converted to (pass null if - // not applicable). - // - // method: - // The System.Reflection.MethodInfo that represents the implementing method. + // expression: + // An System.Linq.Expressions.Expression to apply the operations on. // // Returns: - // The System.Linq.Expressions.UnaryExpression that results from calling the - // appropriate factory method. - // - // Exceptions: - // System.ArgumentException: - // unaryType does not correspond to a unary expression node. - // - // System.ArgumentNullException: - // operand is null. + // A System.Linq.Expressions.UnaryExpression that represents the resultant expression. [Pure] - public static UnaryExpression MakeUnary(ExpressionType unaryType, Expression operand, Type type, MethodInfo method) + public static UnaryExpression PostDecrementAssign(Expression expression) { - Contract.Requires(operand != null); + Contract.Requires(expression != null); Contract.Ensures(Contract.Result() != null); return default(UnaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.MemberMemberBinding that represents the - // recursive initialization of members of a field or property. + // Creates a System.Linq.Expressions.UnaryExpression that represents the assignment + // of the expression followed by a subsequent decrement by 1 of the original expression. // // Parameters: - // member: - // The System.Reflection.MemberInfo to set the System.Linq.Expressions.MemberBinding.Member - // property equal to. + // expression: + // An System.Linq.Expressions.Expression to apply the operations on. // - // bindings: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.MemberBinding - // objects to use to populate the System.Linq.Expressions.MemberMemberBinding.Bindings - // collection. + // method: + // A System.Reflection.MethodInfo that represents the implementing method. // // Returns: - // A System.Linq.Expressions.MemberMemberBinding that has the System.Linq.Expressions.MemberBinding.BindingType - // property equal to System.Linq.Expressions.MemberBindingType.MemberBinding - // and the System.Linq.Expressions.MemberBinding.Member and System.Linq.Expressions.MemberMemberBinding.Bindings - // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // member or bindings is null. - // - // System.ArgumentException: - // member does not represent a field or property. -or- The System.Linq.Expressions.MemberBinding.Member - // property of an element of bindings does not represent a member of the type - // of the field or property that member represents. + // A System.Linq.Expressions.UnaryExpression that represents the resultant expression. [Pure] - public static MemberMemberBinding MemberBind(MemberInfo member, IEnumerable bindings) + public static UnaryExpression PostDecrementAssign(Expression expression, MethodInfo method) { - Contract.Requires(member != null); - Contract.Requires(bindings != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberMemberBinding); + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); } +#endif +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.MemberMemberBinding that represents the - // recursive initialization of members of a field or property. + // Creates a System.Linq.Expressions.UnaryExpression that represents the assignment + // of the expression followed by a subsequent increment by 1 of the original expression. // // Parameters: - // member: - // The System.Reflection.MemberInfo to set the System.Linq.Expressions.MemberBinding.Member - // property equal to. - // - // bindings: - // An array of System.Linq.Expressions.MemberBinding objects to use to populate - // the System.Linq.Expressions.MemberMemberBinding.Bindings collection. + // expression: + // An System.Linq.Expressions.Expression to apply the operations on. // // Returns: - // A System.Linq.Expressions.MemberMemberBinding that has the System.Linq.Expressions.MemberBinding.BindingType - // property equal to System.Linq.Expressions.MemberBindingType.MemberBinding - // and the System.Linq.Expressions.MemberBinding.Member and System.Linq.Expressions.MemberMemberBinding.Bindings - // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // member or bindings is null. - // - // System.ArgumentException: - // member does not represent a field or property. -or- The System.Linq.Expressions.MemberBinding.Member - // property of an element of bindings does not represent a member of the type - // of the field or property that member represents. + // A System.Linq.Expressions.UnaryExpression that represents the resultant expression. [Pure] - public static MemberMemberBinding MemberBind(MemberInfo member, params MemberBinding[] bindings) + public static UnaryExpression PostIncrementAssign(Expression expression) { - Contract.Requires(member != null); - Contract.Requires(bindings != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberMemberBinding); + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.MemberMemberBinding that represents the - // recursive initialization of members of a member that is accessed by using - // a property accessor method. + // Creates a System.Linq.Expressions.UnaryExpression that represents the assignment + // of the expression followed by a subsequent increment by 1 of the original expression. // // Parameters: - // propertyAccessor: - // The System.Reflection.MethodInfo that represents a property accessor method. - // - // bindings: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.MemberBinding - // objects to use to populate the System.Linq.Expressions.MemberMemberBinding.Bindings - // collection. - // - // Returns: - // A System.Linq.Expressions.MemberMemberBinding that has the System.Linq.Expressions.MemberBinding.BindingType - // property equal to System.Linq.Expressions.MemberBindingType.MemberBinding, - // the System.Linq.Expressions.MemberBinding.Member property set to the System.Reflection.PropertyInfo - // that represents the property accessed in propertyAccessor, and System.Linq.Expressions.MemberMemberBinding.Bindings - // properties set to the specified values. + // expression: + // An System.Linq.Expressions.Expression to apply the operations on. // - // Exceptions: - // System.ArgumentNullException: - // propertyAccessor or bindings is null. + // method: + // A System.Reflection.MethodInfo that represents the implementing method. // - // System.ArgumentException: - // propertyAccessor does not represent a property accessor method. -or- The - // System.Linq.Expressions.MemberBinding.Member property of an element of bindings - // does not represent a member of the type of the property accessed by the method - // that propertyAccessor represents. + // Returns: + // A System.Linq.Expressions.UnaryExpression that represents the resultant expression. [Pure] - public static MemberMemberBinding MemberBind(MethodInfo propertyAccessor, IEnumerable bindings) + public static UnaryExpression PostIncrementAssign(Expression expression, MethodInfo method) { - Contract.Requires(propertyAccessor != null); - Contract.Requires(bindings != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberMemberBinding); + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.MemberMemberBinding that represents the - // recursive initialization of members of a member that is accessed by using - // a property accessor method. + // Creates a System.Linq.Expressions.BinaryExpression that represents raising + // a number to a power. // // Parameters: - // propertyAccessor: - // The System.Reflection.MethodInfo that represents a property accessor method. + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. // - // bindings: - // An array of System.Linq.Expressions.MemberBinding objects to use to populate - // the System.Linq.Expressions.MemberMemberBinding.Bindings collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // // Returns: - // A System.Linq.Expressions.MemberMemberBinding that has the System.Linq.Expressions.MemberBinding.BindingType - // property equal to System.Linq.Expressions.MemberBindingType.MemberBinding, - // the System.Linq.Expressions.MemberBinding.Member property set to the System.Reflection.PropertyInfo - // that represents the property accessed in propertyAccessor, and System.Linq.Expressions.MemberMemberBinding.Bindings - // properties set to the specified values. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Power and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the + // specified values. // // Exceptions: // System.ArgumentNullException: - // propertyAccessor or bindings is null. + // left or right is null. // - // System.ArgumentException: - // propertyAccessor does not represent a property accessor method. -or- The - // System.Linq.Expressions.MemberBinding.Member property of an element of bindings - // does not represent a member of the type of the property accessed by the method - // that propertyAccessor represents. + // System.InvalidOperationException: + // The exponentiation operator is not defined for left.Type and right.Type. + // -or- left.Type and/or right.Type are not System.Double. [Pure] - public static MemberMemberBinding MemberBind(MethodInfo propertyAccessor, params MemberBinding[] bindings) + public static BinaryExpression Power(Expression left, Expression right) { - Contract.Requires(propertyAccessor != null); - Contract.Requires(bindings != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberMemberBinding); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.MemberInitExpression. + // Creates a System.Linq.Expressions.BinaryExpression that represents raising + // a number to a power. The implementing method can be specified. // // Parameters: - // newExpression: - // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.MemberInitExpression.NewExpression + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // bindings: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.MemberBinding - // objects to use to populate the System.Linq.Expressions.MemberInitExpression.Bindings - // collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. // // Returns: - // A System.Linq.Expressions.MemberInitExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.MemberInit and the - // System.Linq.Expressions.MemberInitExpression.NewExpression and System.Linq.Expressions.MemberInitExpression.Bindings + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Power and the System.Linq.Expressions.BinaryExpression.Left, + // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: - // newExpression or bindings is null. + // left or right is null. // // System.ArgumentException: - // The System.Linq.Expressions.MemberBinding.Member property of an element of - // bindings does not represent a member of the type that newExpression.Type - // represents. + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the exponentiation operator is not defined for left.Type + // and right.Type. -or- method is null and left.Type and/or right.Type are + // not System.Double. [Pure] - public static MemberInitExpression MemberInit(NewExpression newExpression, IEnumerable bindings) + public static BinaryExpression Power(Expression left, Expression right, MethodInfo method) { - Contract.Requires(newExpression != null); - Contract.Requires(bindings != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberInitExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.MemberInitExpression. + // Creates a System.Linq.Expressions.BinaryExpression that represents raising an + // expression to a power and assigning the result back to the expression. // // Parameters: - // newExpression: - // A System.Linq.Expressions.NewExpression to set the System.Linq.Expressions.MemberInitExpression.NewExpression + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // bindings: - // An array of System.Linq.Expressions.MemberBinding objects to use to populate - // the System.Linq.Expressions.MemberInitExpression.Bindings collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // // Returns: - // A System.Linq.Expressions.MemberInitExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.MemberInit and the - // System.Linq.Expressions.MemberInitExpression.NewExpression and System.Linq.Expressions.MemberInitExpression.Bindings + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.PowerAssign and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // newExpression or bindings is null. - // - // System.ArgumentException: - // The System.Linq.Expressions.MemberBinding.Member property of an element of - // bindings does not represent a member of the type that newExpression.Type - // represents. [Pure] - public static MemberInitExpression MemberInit(NewExpression newExpression, params MemberBinding[] bindings) + public static BinaryExpression PowerAssign(Expression left, Expression right) { - Contract.Requires(newExpression != null); - Contract.Requires(bindings != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberInitExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // remainder operation. + // Creates a System.Linq.Expressions.BinaryExpression that represents raising an + // expression to a power and assigning the result back to the expression. // // Parameters: // left: @@ -3844,20 +8374,18 @@ public static MemberInitExpression MemberInit(NewExpression newExpression, param // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Modulo and the System.Linq.Expressions.BinaryExpression.Left - // and System.Linq.Expressions.BinaryExpression.Right properties set to the - // specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.InvalidOperationException: - // The modulus operator is not defined for left.Type and right.Type. + // property equal to System.Linq.Expressions.ExpressionType.PowerAssign and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the specified + // values. [Pure] - public static BinaryExpression Modulo(Expression left, Expression right) + public static BinaryExpression PowerAssign(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -3866,277 +8394,377 @@ public static BinaryExpression Modulo(Expression left, Expression right) } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // remainder operation. The implementing method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents raising an + // expression to a power and assigning the result back to the expression. // // Parameters: // left: // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.PowerAssign and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion + // properties set to the specified values. + [Pure] + public static BinaryExpression PowerAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that decrements the expression + // by 1 and assigns the result back to the expression. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to apply the operations on. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that represents the resultant expression. + [Pure] + public static UnaryExpression PreDecrementAssign(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that decrements the expression + // by 1 and assigns the result back to the expression. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to apply the operations on. + // + // method: + // A System.Reflection.MethodInfo that represents the implementing method. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that represents the resultant expression. + [Pure] + public static UnaryExpression PreDecrementAssign(Expression expression, MethodInfo method) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that increments the expression + // by 1 and assigns the result back to the expression. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to apply the operations on. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that represents the resultant expression. + [Pure] + public static UnaryExpression PreIncrementAssign(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that increments the expression + // by 1 and assigns the result back to the expression. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to apply the operations on. + // + // method: + // A System.Reflection.MethodInfo that represents the implementing method. + // + // Returns: + // A System.Linq.Expressions.UnaryExpression that represents the resultant expression. + [Pure] + public static UnaryExpression PreIncrementAssign(Expression expression, MethodInfo method) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } +#endif + + // + // Summary: + // Creates a System.Linq.Expressions.MemberExpression that represents accessing + // a property by using a property accessor method. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.MemberExpression.Expression // property equal to. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method - // property equal to. + // propertyAccessor: + // The System.Reflection.MethodInfo that represents a property accessor method. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Modulo and the System.Linq.Expressions.BinaryExpression.Left, - // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method - // properties set to the specified values. + // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MemberAccess, the + // System.Linq.Expressions.MemberExpression.Expression property set to expression + // and the System.Linq.Expressions.MemberExpression.Member property set to the + // System.Reflection.PropertyInfo that represents the property accessed in propertyAccessor. // // Exceptions: // System.ArgumentNullException: - // left or right is null. + // propertyAccessor is null. -or- The method that propertyAccessor represents + // is not static (Shared in Visual Basic) and expression is null. // // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. - // - // System.InvalidOperationException: - // method is null and the modulus operator is not defined for left.Type and - // right.Type. + // expression.Type is not assignable to the declaring type of the method represented + // by propertyAccessor. -or- The method that propertyAccessor represents is + // not a property accessor method. [Pure] - public static BinaryExpression Modulo(Expression left, Expression right, MethodInfo method) + public static MemberExpression Property(Expression expression, MethodInfo propertyAccessor) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(propertyAccessor != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // multiplication operation that does not have overflow checking. + // Creates a System.Linq.Expressions.MemberExpression that represents accessing + // a property. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.MemberExpression.Expression // property equal to. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property: + // The System.Reflection.PropertyInfo to set the System.Linq.Expressions.MemberExpression.Member // property equal to. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Multiply and the - // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MemberAccess and + // the System.Linq.Expressions.MemberExpression.Expression and System.Linq.Expressions.MemberExpression.Member // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: - // left or right is null. + // property is null. -or- The property that property represents is not static + // (Shared in Visual Basic) and expression is null. // - // System.InvalidOperationException: - // The multiplication operator is not defined for left.Type and right.Type. + // System.ArgumentException: + // expression.Type is not assignable to the declaring type of the property that + // property represents. [Pure] - public static BinaryExpression Multiply(Expression left, Expression right) + public static MemberExpression Property(Expression expression, PropertyInfo property) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(property != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // multiplication operation that does not have overflow checking and for which - // the implementing method is specified. + // Creates a System.Linq.Expressions.MemberExpression that represents accessing + // a property given the name of the property. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. - // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // expression: + // An System.Linq.Expressions.Expression whose System.Linq.Expressions.Expression.Type + // contains a property named propertyName. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method - // property equal to. + // propertyName: + // The name of a property. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Multiply and the - // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // and System.Linq.Expressions.BinaryExpression.Method properties set to the - // specified values. + // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MemberAccess, the + // System.Linq.Expressions.MemberExpression.Expression property set to expression, + // and the System.Linq.Expressions.MemberExpression.Member property set to the + // System.Reflection.PropertyInfo that represents the property denoted by propertyName. // // Exceptions: // System.ArgumentNullException: - // left or right is null. + // expression or propertyName is null. // // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. - // - // System.InvalidOperationException: - // method is null and the multiplication operator is not defined for left.Type - // and right.Type. + // No property named propertyName is defined in expression.Type or its base + // types. [Pure] - public static BinaryExpression Multiply(Expression left, Expression right, MethodInfo method) + public static MemberExpression Property(Expression expression, string propertyName) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(propertyName != null); + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberExpression); } +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // multiplication operation that has overflow checking. + // Creates an System.Linq.Expressions.IndexExpression representing the access to + // an indexed property. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. - // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // instance: + // The object to which the property belongs. If the property is static/shared, it + // must be null. // - // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.MultiplyChecked - // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right - // properties set to the specified values. + // indexer: + // The System.Reflection.PropertyInfo that represents the property to index. // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. + // arguments: + // An System.Collections.Generic.IEnumerable`1 of System.Linq.Expressions.Expression + // objects that are used to index the property. // - // System.InvalidOperationException: - // The multiplication operator is not defined for left.Type and right.Type. + // Returns: + // The created System.Linq.Expressions.IndexExpression. [Pure] - public static BinaryExpression MultiplyChecked(Expression left, Expression right) + public static IndexExpression Property(Expression instance, PropertyInfo indexer, IEnumerable arguments) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(indexer != null); + Contract.Ensures(Contract.Result() != null); + return default(IndexExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // multiplication operation that has overflow checking. The implementing method - // can be specified. + // Creates a System.Linq.Expressions.MemberExpression accessing a property. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. + // expression: + // The containing object of the property. This can be null for static properties. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // type: + // The System.Linq.Expressions.Expression.Type that contains the property. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method - // property equal to. + // propertyName: + // The property to be accessed. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.MultiplyChecked - // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // and System.Linq.Expressions.BinaryExpression.Method properties set to the - // specified values. + // The created System.Linq.Expressions.MemberExpression. + [Pure] + public static MemberExpression Property(Expression expression, Type type, string propertyName) + { + Contract.Requires(type != null); + Contract.Requires(propertyName != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberExpression); + } // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. + // Summary: + // Creates an System.Linq.Expressions.IndexExpression representing the access to + // an indexed property. // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. + // Parameters: + // instance: + // The object to which the property belongs. If the property is static/shared, it + // must be null. // - // System.InvalidOperationException: - // method is null and the multiplication operator is not defined for left.Type - // and right.Type. + // indexer: + // The System.Reflection.PropertyInfo that represents the property to index. + // + // arguments: + // An array of System.Linq.Expressions.Expression objects that are used to index + // the property. + // + // Returns: + // The created System.Linq.Expressions.IndexExpression. [Pure] - public static BinaryExpression MultiplyChecked(Expression left, Expression right, MethodInfo method) + public static IndexExpression Property(Expression instance, PropertyInfo indexer, params Expression[] arguments) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(indexer != null); + Contract.Ensures(Contract.Result() != null); + return default(IndexExpression); } // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents an arithmetic - // negation operation. + // Creates an System.Linq.Expressions.IndexExpression representing the access to + // an indexed property. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand - // property equal to. + // instance: + // The object to which the property belongs. This parameter must not be null. // - // Returns: - // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Negate and the System.Linq.Expressions.UnaryExpression.Operand - // property set to the specified value. + // propertyName: + // The name of the indexer. // - // Exceptions: - // System.ArgumentNullException: - // expression is null. + // arguments: + // An array of System.Linq.Expressions.Expression objects that are used to index + // the property. // - // System.InvalidOperationException: - // The unary minus operator is not defined for expression.Type. + // Returns: + // The created System.Linq.Expressions.IndexExpression. [Pure] - public static UnaryExpression Negate(Expression expression) + public static IndexExpression Property(Expression instance, string propertyName, params Expression[] arguments) { - Contract.Requires(expression != null); - Contract.Ensures(Contract.Result() != null); - return default(UnaryExpression); + Contract.Requires(instance != null); + Contract.Requires(propertyName != null); + Contract.Ensures(Contract.Result() != null); + return default(IndexExpression); } +#endif // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents an arithmetic - // negation operation. The implementing method can be specified. + // Creates a System.Linq.Expressions.MemberExpression that represents accessing + // a property or field given the name of the property or field. // // Parameters: // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand - // property equal to. + // An System.Linq.Expressions.Expression whose System.Linq.Expressions.Expression.Type + // contains a property or field named propertyOrFieldName. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.UnaryExpression.Method - // property equal to. + // propertyOrFieldName: + // The name of a property or field. // // Returns: - // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Negate and the System.Linq.Expressions.UnaryExpression.Operand - // and System.Linq.Expressions.UnaryExpression.Method properties set to the - // specified values. + // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.MemberAccess, the + // System.Linq.Expressions.MemberExpression.Expression property set to expression, + // and the System.Linq.Expressions.MemberExpression.Member property set to the + // System.Reflection.PropertyInfo or System.Reflection.FieldInfo that represents + // the property or field denoted by propertyOrFieldName. // // Exceptions: // System.ArgumentNullException: - // expression is null. - // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly one argument. + // expression or propertyOrFieldName is null. // - // System.InvalidOperationException: - // method is null and the unary minus operator is not defined for expression.Type. - // -or- expression.Type (or its corresponding non-nullable type if it is a - // nullable value type) is not assignable to the argument type of the method - // represented by method. + // System.ArgumentException: + // No property or field named propertyOrFieldName is defined in expression.Type + // or its base types. [Pure] - public static UnaryExpression Negate(Expression expression, MethodInfo method) + public static MemberExpression PropertyOrField(Expression expression, string propertyOrFieldName) { Contract.Requires(expression != null); - Contract.Ensures(Contract.Result() != null); - return default(UnaryExpression); + Contract.Requires(propertyOrFieldName != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberExpression); } + // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents an arithmetic - // negation operation that has overflow checking. + // Creates a System.Linq.Expressions.UnaryExpression that represents an expression + // that has a constant value of type System.Linq.Expressions.Expression. // // Parameters: // expression: @@ -4145,503 +8773,522 @@ public static UnaryExpression Negate(Expression expression, MethodInfo method) // // Returns: // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.NegateChecked and - // the System.Linq.Expressions.UnaryExpression.Operand property set to the specified - // value. + // property equal to System.Linq.Expressions.ExpressionType.Quote and the System.Linq.Expressions.UnaryExpression.Operand + // property set to the specified value. // // Exceptions: // System.ArgumentNullException: // expression is null. - // - // System.InvalidOperationException: - // The unary minus operator is not defined for expression.Type. [Pure] - public static UnaryExpression NegateChecked(Expression expression) + public static UnaryExpression Quote(Expression expression) { Contract.Requires(expression != null); Contract.Ensures(Contract.Result() != null); return default(UnaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents an arithmetic - // negation operation that has overflow checking. The implementing method can - // be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents a reference + // equality comparison. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.UnaryExpression.Method + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // // Returns: - // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.NegateChecked and - // the System.Linq.Expressions.UnaryExpression.Operand and System.Linq.Expressions.UnaryExpression.Method - // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // expression is null. - // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly one argument. - // - // System.InvalidOperationException: - // method is null and the unary minus operator is not defined for expression.Type. - // -or- expression.Type (or its corresponding non-nullable type if it is a - // nullable value type) is not assignable to the argument type of the method - // represented by method. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Equal and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the specified + // values. [Pure] - public static UnaryExpression NegateChecked(Expression expression, MethodInfo method) + public static BinaryExpression ReferenceEqual(Expression left, Expression right) { - Contract.Requires(expression != null); - Contract.Ensures(Contract.Result() != null); - return default(UnaryExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.NewExpression that represents calling the - // specified constructor that takes no arguments. + // Creates a System.Linq.Expressions.BinaryExpression that represents a reference + // inequality comparison. // // Parameters: - // constructor: - // The System.Reflection.ConstructorInfo to set the System.Linq.Expressions.NewExpression.Constructor + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // // Returns: - // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor - // property set to the specified value. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.NotEqual and the System.Linq.Expressions.BinaryExpression.Left + // and System.Linq.Expressions.BinaryExpression.Right properties set to the specified + // values. + [Pure] + public static BinaryExpression ReferenceNotEqual(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // - // Exceptions: - // System.ArgumentNullException: - // constructor is null. + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents a rethrowing + // of an exception. // - // System.ArgumentException: - // The constructor that constructor represents has at least one parameter. + // Returns: + // A System.Linq.Expressions.UnaryExpression that represents a rethrowing of an + // exception. [Pure] - public static NewExpression New(ConstructorInfo constructor) + public static UnaryExpression Rethrow() { - Contract.Requires(constructor != null); - Contract.Ensures(Contract.Result() != null); - return default(NewExpression); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.NewExpression that represents calling the - // parameterless constructor of the specified type. + // Creates a System.Linq.Expressions.UnaryExpression that represents a rethrowing + // of an exception with a given type. // // Parameters: // type: - // A System.Type that has a constructor that takes no arguments. + // The new System.Type of the expression. // // Returns: - // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor - // property set to the System.Reflection.ConstructorInfo that represents the - // parameterless constructor of the specified type. + // A System.Linq.Expressions.UnaryExpression that represents a rethrowing of an + // exception. + [Pure] + public static UnaryExpression Rethrow(Type type) + { + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // - // Exceptions: - // System.ArgumentNullException: - // type is null. + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a return statement. // - // System.ArgumentException: - // The type that type represents does not have a parameterless constructor. + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Return, the System.Linq.Expressions.GotoExpression.Target property set + // to target, and a null value to be passed to the target label upon jumping. [Pure] - public static NewExpression New(Type type) + public static GotoExpression Return(LabelTarget target) { - Contract.Requires(type != null); - Contract.Ensures(Contract.Result() != null); - return default(NewExpression); + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); } // // Summary: - // Creates a System.Linq.Expressions.NewExpression that represents calling the - // specified constructor with the specified arguments. + // Creates a System.Linq.Expressions.GotoExpression representing a return statement. + // The value passed to the label upon jumping can be specified. // // Parameters: - // constructor: - // The System.Reflection.ConstructorInfo to set the System.Linq.Expressions.NewExpression.Constructor - // property equal to. + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. // - // arguments: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression - // objects to use to populate the System.Linq.Expressions.NewExpression.Arguments - // collection. + // value: + // The value that will be passed to the associated label upon jumping. // // Returns: - // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor - // and System.Linq.Expressions.NewExpression.Arguments properties set to the - // specified values. - // - // Exceptions: - // System.ArgumentNullException: - // constructor is null. -or- An element of arguments is null. - // - // System.ArgumentException: - // The arguments parameter does not contain the same number of elements as the - // number of parameters for the constructor that constructor represents. -or- - // The System.Linq.Expressions.Expression.Type property of an element of arguments - // is not assignable to the type of the corresponding parameter of the constructor - // that constructor represents. + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Continue, the System.Linq.Expressions.GotoExpression.Target property + // set to target, and value to be passed to the target label upon jumping. [Pure] - public static NewExpression New(ConstructorInfo constructor, IEnumerable arguments) + public static GotoExpression Return(LabelTarget target, Expression value) { - Contract.Requires(constructor != null); - Contract.Ensures(Contract.Result() != null); - return default(NewExpression); + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); } // // Summary: - // Creates a System.Linq.Expressions.NewExpression that represents calling the - // specified constructor with the specified arguments. + // Creates a System.Linq.Expressions.GotoExpression representing a return statement + // with the specified type. // // Parameters: - // constructor: - // The System.Reflection.ConstructorInfo to set the System.Linq.Expressions.NewExpression.Constructor - // property equal to. + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. // - // arguments: - // An array of System.Linq.Expressions.Expression objects to use to populate - // the System.Linq.Expressions.NewExpression.Arguments collection. + // type: + // An System.Type to set the System.Linq.Expressions.Expression.Type property equal + // to. // // Returns: - // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor - // and System.Linq.Expressions.NewExpression.Arguments properties set to the - // specified values. + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Return, the System.Linq.Expressions.GotoExpression.Target property set + // to target, the System.Linq.Expressions.Expression.Type property set to type, + // and a null value to be passed to the target label upon jumping. + [Pure] + public static GotoExpression Return(LabelTarget target, Type type) + { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); + } // - // Exceptions: - // System.ArgumentNullException: - // constructor is null. -or- An element of arguments is null. + // Summary: + // Creates a System.Linq.Expressions.GotoExpression representing a return statement + // with the specified type. The value passed to the label upon jumping can be specified. // - // System.ArgumentException: - // The length of arguments does match the number of parameters for the constructor - // that constructor represents. -or- The System.Linq.Expressions.Expression.Type - // property of an element of arguments is not assignable to the type of the - // corresponding parameter of the constructor that constructor represents. + // Parameters: + // target: + // The System.Linq.Expressions.LabelTarget that the System.Linq.Expressions.GotoExpression + // will jump to. + // + // value: + // The value that will be passed to the associated label upon jumping. + // + // type: + // An System.Type to set the System.Linq.Expressions.Expression.Type property equal + // to. + // + // Returns: + // A System.Linq.Expressions.GotoExpression with System.Linq.Expressions.GotoExpression.Kind + // equal to Continue, the System.Linq.Expressions.GotoExpression.Target property + // set to target, the System.Linq.Expressions.Expression.Type property set to type, + // and value to be passed to the target label upon jumping. [Pure] - public static NewExpression New(ConstructorInfo constructor, params Expression[] arguments) + public static GotoExpression Return(LabelTarget target, Expression value, Type type) { - Contract.Requires(constructor != null); - Contract.Ensures(Contract.Result() != null); - return default(NewExpression); + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); + return default(GotoExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.NewExpression that represents calling the - // specified constructor with the specified arguments. The members that access - // the constructor initialized fields are specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // right-shift operation. // // Parameters: - // constructor: - // The System.Reflection.ConstructorInfo to set the System.Linq.Expressions.NewExpression.Constructor + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // arguments: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression - // objects to use to populate the System.Linq.Expressions.NewExpression.Arguments - // collection. - // - // members: - // An System.Collections.Generic.IEnumerable that contains System.Reflection.MemberInfo - // objects to use to populate the System.Linq.Expressions.NewExpression.Members - // collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // // Returns: - // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor, - // System.Linq.Expressions.NewExpression.Arguments and System.Linq.Expressions.NewExpression.Members + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.RightShift and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: - // constructor is null. -or- An element of arguments is null. -or- An element - // of members is null. + // left or right is null. // - // System.ArgumentException: - // The arguments parameter does not contain the same number of elements as the - // number of parameters for the constructor that constructor represents. -or- - // The System.Linq.Expressions.Expression.Type property of an element of arguments - // is not assignable to the type of the corresponding parameter of the constructor - // that constructor represents. -or- The members parameter does not have the - // same number of elements as arguments. -or- An element of arguments has a - // System.Linq.Expressions.Expression.Type property that represents a type that - // is not assignable to the type of the member that is represented by the corresponding - // element of members. -or- An element of members represents a property that - // does not have a get accessor. + // System.InvalidOperationException: + // The right-shift operator is not defined for left.Type and right.Type. [Pure] - public static NewExpression New(ConstructorInfo constructor, IEnumerable arguments, IEnumerable members) + public static BinaryExpression RightShift(Expression left, Expression right) { - Contract.Requires(constructor != null); - Contract.Ensures(Contract.Result() != null); - return default(NewExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.NewExpression that represents calling the - // specified constructor with the specified arguments. The members that access - // the constructor initialized fields are specified as an array. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // right-shift operation. The implementing method can be specified. // // Parameters: - // constructor: - // The System.Reflection.ConstructorInfo to set the System.Linq.Expressions.NewExpression.Constructor + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left // property equal to. // - // arguments: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression - // objects to use to populate the System.Linq.Expressions.NewExpression.Arguments - // collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // - // members: - // An array of System.Reflection.MemberInfo objects to use to populate the System.Linq.Expressions.NewExpression.Members - // collection. + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. // // Returns: - // A System.Linq.Expressions.NewExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.New and the System.Linq.Expressions.NewExpression.Constructor, - // System.Linq.Expressions.NewExpression.Arguments and System.Linq.Expressions.NewExpression.Members - // properties set to the specified values. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.RightShift and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the + // specified values. // // Exceptions: // System.ArgumentNullException: - // constructor is null. -or- An element of arguments is null. -or- An element - // of members is null. + // left or right is null. // // System.ArgumentException: - // The arguments parameter does not contain the same number of elements as the - // number of parameters for the constructor that constructor represents. -or- - // The System.Linq.Expressions.Expression.Type property of an element of arguments - // is not assignable to the type of the corresponding parameter of the constructor - // that constructor represents. -or- The members parameter does not have the - // same number of elements as arguments. -or- An element of arguments has a - // System.Linq.Expressions.Expression.Type property that represents a type that - // is not assignable to the type of the member that is represented by the corresponding - // element of members. -or- An element of members represents a property that - // does not have a get accessor. + // method is not null and the method it represents returns void, is not static + // (Shared in Visual Basic), or does not take exactly two arguments. + // + // System.InvalidOperationException: + // method is null and the right-shift operator is not defined for left.Type + // and right.Type. [Pure] - public static NewExpression New(ConstructorInfo constructor, IEnumerable arguments, params MemberInfo[] members) + public static BinaryExpression RightShift(Expression left, Expression right, MethodInfo method) { - Contract.Requires(constructor != null); - Contract.Ensures(Contract.Result() != null); - return default(NewExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.NewArrayExpression that represents creating - // an array that has a specified rank. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // right-shift assignment operation. // // Parameters: - // type: - // A System.Type that represents the element type of the array. + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. // - // bounds: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression - // objects to use to populate the System.Linq.Expressions.NewArrayExpression.Expressions - // collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // // Returns: - // A System.Linq.Expressions.NewArrayExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.NewArrayBounds and - // the System.Linq.Expressions.NewArrayExpression.Expressions property set to - // the specified value. - // - // Exceptions: - // System.ArgumentNullException: - // type or bounds is null. -or- An element of bounds is null. - // - // System.ArgumentException: - // The System.Linq.Expressions.Expression.Type property of an element of bounds - // does not represent an integral type. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.RightShiftAssign and + // the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. [Pure] - public static NewArrayExpression NewArrayBounds(Type type, IEnumerable bounds) + public static BinaryExpression RightShiftAssign(Expression left, Expression right) { - Contract.Requires(type != null); - Contract.Requires(bounds != null); - Contract.Ensures(Contract.Result() != null); - return default(NewArrayExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.NewArrayExpression that represents creating - // an array that has a specified rank. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // right-shift assignment operation. // // Parameters: - // type: - // A System.Type that represents the element type of the array. - // - // bounds: - // An array of System.Linq.Expressions.Expression objects to use to populate - // the System.Linq.Expressions.NewArrayExpression.Expressions collection. + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. // - // Returns: - // A System.Linq.Expressions.NewArrayExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.NewArrayBounds and - // the System.Linq.Expressions.NewArrayExpression.Expressions property set to - // the specified value. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // - // Exceptions: - // System.ArgumentNullException: - // type or bounds is null. -or- An element of bounds is null. + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. // - // System.ArgumentException: - // The System.Linq.Expressions.Expression.Type property of an element of bounds - // does not represent an integral type. + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.RightShiftAssign and + // the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the specified + // values. [Pure] - public static NewArrayExpression NewArrayBounds(Type type, params Expression[] bounds) + public static BinaryExpression RightShiftAssign(Expression left, Expression right, MethodInfo method) { - Contract.Requires(type != null); - Contract.Requires(bounds != null); - Contract.Ensures(Contract.Result() != null); - return default(NewArrayExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.NewArrayExpression that represents creating - // a one-dimensional array and initializing it from a list of elements. + // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise + // right-shift assignment operation. // // Parameters: - // type: - // A System.Type that represents the element type of the array. + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. // - // initializers: - // An System.Collections.Generic.IEnumerable that contains System.Linq.Expressions.Expression - // objects to use to populate the System.Linq.Expressions.NewArrayExpression.Expressions - // collection. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. // - // Returns: - // A System.Linq.Expressions.NewArrayExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.NewArrayInit and - // the System.Linq.Expressions.NewArrayExpression.Expressions property set to - // the specified value. + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. // - // Exceptions: - // System.ArgumentNullException: - // type or initializers is null. -or- An element of initializers is null. + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. // - // System.InvalidOperationException: - // The System.Linq.Expressions.Expression.Type property of an element of initializers - // represents a type that is not assignable to the type that type represents. + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.RightShiftAssign and + // the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion + // properties set to the specified values. [Pure] - public static NewArrayExpression NewArrayInit(Type type, IEnumerable initializers) + public static BinaryExpression RightShiftAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) { - Contract.Requires(type != null); - Contract.Requires(initializers != null); - Contract.Ensures(Contract.Result() != null); - return default(NewArrayExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.NewArrayExpression that represents creating - // a one-dimensional array and initializing it from a list of elements. + // Creates an instance of System.Linq.Expressions.RuntimeVariablesExpression. // // Parameters: - // type: - // A System.Type that represents the element type of the array. - // - // initializers: - // An array of System.Linq.Expressions.Expression objects to use to populate - // the System.Linq.Expressions.NewArrayExpression.Expressions collection. + // variables: + // A collection of System.Linq.Expressions.ParameterExpression objects to use to + // populate the System.Linq.Expressions.RuntimeVariablesExpression.Variables collection. // // Returns: - // A System.Linq.Expressions.NewArrayExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.NewArrayInit and - // the System.Linq.Expressions.NewArrayExpression.Expressions property set to - // the specified value. + // An instance of System.Linq.Expressions.RuntimeVariablesExpression that has the + // System.Linq.Expressions.Expression.NodeType property equal to System.Linq.Expressions.ExpressionType.RuntimeVariables + // and the System.Linq.Expressions.RuntimeVariablesExpression.Variables property + // set to the specified value. + [Pure] + public static RuntimeVariablesExpression RuntimeVariables(IEnumerable variables) + { + Contract.Requires(variables != null); + Contract.Ensures(Contract.Result() != null); + return default(RuntimeVariablesExpression); + } // - // Exceptions: - // System.ArgumentNullException: - // type or initializers is null. -or- An element of initializers is null. + // Summary: + // Creates an instance of System.Linq.Expressions.RuntimeVariablesExpression. // - // System.InvalidOperationException: - // The System.Linq.Expressions.Expression.Type property of an element of initializers - // represents a type that is not assignable to the type type. + // Parameters: + // variables: + // An array of System.Linq.Expressions.ParameterExpression objects to use to populate + // the System.Linq.Expressions.RuntimeVariablesExpression.Variables collection. + // + // Returns: + // An instance of System.Linq.Expressions.RuntimeVariablesExpression that has the + // System.Linq.Expressions.Expression.NodeType property equal to System.Linq.Expressions.ExpressionType.RuntimeVariables + // and the System.Linq.Expressions.RuntimeVariablesExpression.Variables property + // set to the specified value. [Pure] - public static NewArrayExpression NewArrayInit(Type type, params Expression[] initializers) + public static RuntimeVariablesExpression RuntimeVariables(params ParameterExpression[] variables) { - Contract.Requires(type != null); - Contract.Requires(initializers != null); - Contract.Ensures(Contract.Result() != null); - return default(NewArrayExpression); + Contract.Requires(variables != null); + Contract.Requires(variables.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(RuntimeVariablesExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents a bitwise - // complement operation. + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // subtraction operation that does not have overflow checking. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // // Returns: - // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Not and the System.Linq.Expressions.UnaryExpression.Operand - // property set to the specified value. + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Subtract and the + // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: - // expression is null. + // left or right is null. // // System.InvalidOperationException: - // The unary not operator is not defined for expression.Type. + // The subtraction operator is not defined for left.Type and right.Type. [Pure] - public static UnaryExpression Not(Expression expression) + public static BinaryExpression Subtract(Expression left, Expression right) { - Contract.Requires(expression != null); - Contract.Ensures(Contract.Result() != null); - return default(UnaryExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents a bitwise - // complement operation. The implementing method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // subtraction operation that does not have overflow checking. The implementing + // method can be specified. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.UnaryExpression.Method + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method // property equal to. // // Returns: - // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Not and the System.Linq.Expressions.UnaryExpression.Operand - // and System.Linq.Expressions.UnaryExpression.Method properties set to the + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.Subtract and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the // specified values. // // Exceptions: // System.ArgumentNullException: - // expression is null. + // left or right is null. // // System.ArgumentException: // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly one argument. + // (Shared in Visual Basic), or does not take exactly two arguments. // // System.InvalidOperationException: - // method is null and the unary not operator is not defined for expression.Type. - // -or- expression.Type (or its corresponding non-nullable type if it is a - // nullable value type) is not assignable to the argument type of the method - // represented by method. + // method is null and the subtraction operator is not defined for left.Type + // and right.Type. [Pure] - public static UnaryExpression Not(Expression expression, MethodInfo method) + public static BinaryExpression Subtract(Expression left, Expression right, MethodInfo method) { - Contract.Requires(expression != null); - Contract.Ensures(Contract.Result() != null); - return default(UnaryExpression); + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an inequality - // comparison. + // Creates a System.Linq.Expressions.BinaryExpression that represents a subtraction + // assignment operation that does not have overflow checking. // // Parameters: // left: @@ -4654,18 +9301,43 @@ public static UnaryExpression Not(Expression expression, MethodInfo method) // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.NotEqual and the + // property equal to System.Linq.Expressions.ExpressionType.SubtractAssign and the // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right // properties set to the specified values. + [Pure] + public static BinaryExpression SubtractAssign(Expression left, Expression right) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a subtraction + // assignment operation that does not have overflow checking. // - // System.InvalidOperationException: - // The inequality operator is not defined for left.Type and right.Type. + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. + // + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.SubtractAssign and the + // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the specified + // values. [Pure] - public static BinaryExpression NotEqual(Expression left, Expression right) + public static BinaryExpression SubtractAssign(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -4674,8 +9346,8 @@ public static BinaryExpression NotEqual(Expression left, Expression right) } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an inequality - // comparison. The implementing method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents a subtraction + // assignment operation that does not have overflow checking. // // Parameters: // left: @@ -4686,34 +9358,52 @@ public static BinaryExpression NotEqual(Expression left, Expression right) // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // - // liftToNull: - // true to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to true; - // false to set System.Linq.Expressions.BinaryExpression.IsLiftedToNull to false. - // // method: // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method // property equal to. // + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. + // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.NotEqual and the + // property equal to System.Linq.Expressions.ExpressionType.SubtractAssign and the // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // System.Linq.Expressions.BinaryExpression.IsLiftedToNull, and System.Linq.Expressions.BinaryExpression.Method + // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion // properties set to the specified values. + [Pure] + public static BinaryExpression SubtractAssign(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) + { + Contract.Requires(left != null); + Contract.Requires(right != null); + Contract.Ensures(Contract.Result() != null); + return default(BinaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. + // Summary: + // Creates a System.Linq.Expressions.BinaryExpression that represents a subtraction + // assignment operation that has overflow checking. // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. + // Parameters: + // left: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left + // property equal to. // - // System.InvalidOperationException: - // method is null and the inequality operator is not defined for left.Type and - // right.Type. + // right: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right + // property equal to. + // + // Returns: + // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType + // property equal to System.Linq.Expressions.ExpressionType.SubtractAssignChecked + // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. [Pure] - public static BinaryExpression NotEqual(Expression left, Expression right, bool liftToNull, MethodInfo method) + public static BinaryExpression SubtractAssignChecked(Expression left, Expression right) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -4722,8 +9412,8 @@ public static BinaryExpression NotEqual(Expression left, Expression right, bool } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise - // OR operation. + // Creates a System.Linq.Expressions.BinaryExpression that represents a subtraction + // assignment operation that has overflow checking. // // Parameters: // left: @@ -4734,20 +9424,18 @@ public static BinaryExpression NotEqual(Expression left, Expression right, bool // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right // property equal to. // + // method: + // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method + // property equal to. + // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Or and the System.Linq.Expressions.BinaryExpression.Left - // and System.Linq.Expressions.BinaryExpression.Right properties set to the - // specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.InvalidOperationException: - // The bitwise OR operator is not defined for left.Type and right.Type. + // property equal to System.Linq.Expressions.ExpressionType.SubtractAssignChecked + // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the specified + // values. [Pure] - public static BinaryExpression Or(Expression left, Expression right) + public static BinaryExpression SubtractAssignChecked(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -4756,8 +9444,8 @@ public static BinaryExpression Or(Expression left, Expression right) } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise - // OR operation. The implementing method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents a subtraction + // assignment operation that has overflow checking. // // Parameters: // left: @@ -4772,35 +9460,30 @@ public static BinaryExpression Or(Expression left, Expression right) // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method // property equal to. // + // conversion: + // A System.Linq.Expressions.LambdaExpression to set the System.Linq.Expressions.BinaryExpression.Conversion + // property equal to. + // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Or and the System.Linq.Expressions.BinaryExpression.Left, - // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method + // property equal to System.Linq.Expressions.ExpressionType.SubtractAssignChecked + // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // System.Linq.Expressions.BinaryExpression.Method, and System.Linq.Expressions.BinaryExpression.Conversion // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. - // - // System.InvalidOperationException: - // method is null and the bitwise OR operator is not defined for left.Type and - // right.Type. [Pure] - public static BinaryExpression Or(Expression left, Expression right, MethodInfo method) + public static BinaryExpression SubtractAssignChecked(Expression left, Expression right, MethodInfo method, LambdaExpression conversion) { Contract.Requires(left != null); Contract.Requires(right != null); Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } +#endif + // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a conditional - // OR operation that evaluates the second operand only if it has to. + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // subtraction operation that has overflow checking. // // Parameters: // left: @@ -4813,19 +9496,18 @@ public static BinaryExpression Or(Expression left, Expression right, MethodInfo // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.OrElse and the System.Linq.Expressions.BinaryExpression.Left - // and System.Linq.Expressions.BinaryExpression.Right properties set to the - // specified values. + // property equal to System.Linq.Expressions.ExpressionType.SubtractChecked + // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right + // properties set to the specified values. // // Exceptions: // System.ArgumentNullException: // left or right is null. // // System.InvalidOperationException: - // The bitwise OR operator is not defined for left.Type and right.Type. -or- - // left.Type and right.Type are not the same Boolean type. + // The subtraction operator is not defined for left.Type and right.Type. [Pure] - public static BinaryExpression OrElse(Expression left, Expression right) + public static BinaryExpression SubtractChecked(Expression left, Expression right) { Contract.Requires(left != null); Contract.Requires(right != null); @@ -4834,9 +9516,9 @@ public static BinaryExpression OrElse(Expression left, Expression right) } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a conditional - // OR operation that evaluates the second operand only if it has to. The implementing - // method can be specified. + // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic + // subtraction operation that has overflow checking. The implementing method + // can be specified. // // Parameters: // left: @@ -4853,9 +9535,10 @@ public static BinaryExpression OrElse(Expression left, Expression right) // // Returns: // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.OrElse and the System.Linq.Expressions.BinaryExpression.Left, - // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method - // properties set to the specified values. + // property equal to System.Linq.Expressions.ExpressionType.SubtractChecked + // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, + // and System.Linq.Expressions.BinaryExpression.Method properties set to the + // specified values. // // Exceptions: // System.ArgumentNullException: @@ -4866,528 +9549,541 @@ public static BinaryExpression OrElse(Expression left, Expression right) // (Shared in Visual Basic), or does not take exactly two arguments. // // System.InvalidOperationException: - // method is null and the bitwise OR operator is not defined for left.Type and - // right.Type. -or- method is null and left.Type and right.Type are not the - // same Boolean type. + // method is null and the subtraction operator is not defined for left.Type + // and right.Type. [Pure] - public static BinaryExpression OrElse(Expression left, Expression right, MethodInfo method) + public static BinaryExpression SubtractChecked(Expression left, Expression right, MethodInfo method) { Contract.Requires(left != null); Contract.Requires(right != null); Contract.Ensures(Contract.Result() != null); return default(BinaryExpression); } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.SwitchExpression that represents a switch statement + // without a default case. + // + // Parameters: + // switchValue: + // The value to be tested against each case. + // + // cases: + // The set of cases for this switch expression. + // + // Returns: + // The created System.Linq.Expressions.SwitchExpression. + [Pure] + public static SwitchExpression Switch(Expression switchValue, params SwitchCase[] cases) + { + Contract.Requires(switchValue != null); + Contract.Requires(cases != null); + Contract.Requires(cases.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(SwitchExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.SwitchExpression that represents a switch statement + // that has a default case. + // + // Parameters: + // switchValue: + // The value to be tested against each case. + // + // defaultBody: + // The result of the switch if switchValue does not match any of the cases. + // + // cases: + // The set of cases for this switch expression. + // + // Returns: + // The created System.Linq.Expressions.SwitchExpression. + [Pure] + public static SwitchExpression Switch(Expression switchValue, Expression defaultBody, params SwitchCase[] cases) + { + Contract.Requires(switchValue != null); + Contract.Requires(cases != null); + Contract.Requires(cases.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(SwitchExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.SwitchExpression that represents a switch statement + // that has a default case. + // + // Parameters: + // switchValue: + // The value to be tested against each case. + // + // defaultBody: + // The result of the switch if switchValue does not match any of the cases. + // + // comparison: + // The equality comparison method to use. + // + // cases: + // The set of cases for this switch expression. + // + // Returns: + // The created System.Linq.Expressions.SwitchExpression. + [Pure] + public static SwitchExpression Switch(Expression switchValue, Expression defaultBody, MethodInfo comparison, IEnumerable cases) + { + Contract.Requires(switchValue != null); + Contract.Requires(cases != null); + Contract.Ensures(Contract.Result() != null); + return default(SwitchExpression); + } + // + // Summary: + // Creates a System.Linq.Expressions.SwitchExpression that represents a switch statement + // that has a default case. + // + // Parameters: + // switchValue: + // The value to be tested against each case. + // + // defaultBody: + // The result of the switch if switchValue does not match any of the cases. + // + // comparison: + // The equality comparison method to use. + // + // cases: + // The set of cases for this switch expression. + // + // Returns: + // The created System.Linq.Expressions.SwitchExpression. + [Pure] + public static SwitchExpression Switch(Expression switchValue, Expression defaultBody, MethodInfo comparison, params SwitchCase[] cases) + { + Contract.Requires(switchValue != null); + Contract.Requires(cases != null); + Contract.Requires(cases.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(SwitchExpression); + } // // Summary: - // Creates a System.Linq.Expressions.ParameterExpression. + // Creates a System.Linq.Expressions.SwitchExpression that represents a switch statement + // that has a default case. // // Parameters: // type: - // A System.Type to set the System.Linq.Expressions.Expression.Type property - // equal to. + // The result type of the switch. // - // name: - // The value to set the System.Linq.Expressions.ParameterExpression.Name property - // equal to. + // switchValue: + // The value to be tested against each case. // - // Returns: - // A System.Linq.Expressions.ParameterExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Parameter and the - // System.Linq.Expressions.Expression.Type and System.Linq.Expressions.ParameterExpression.Name - // properties set to the specified values. + // defaultBody: + // The result of the switch if switchValue does not match any of the cases. // - // Exceptions: - // System.ArgumentNullException: - // type is null. + // comparison: + // The equality comparison method to use. + // + // cases: + // The set of cases for this switch expression. + // + // Returns: + // The created System.Linq.Expressions.SwitchExpression. [Pure] - public static ParameterExpression Parameter(Type type, string name) + public static SwitchExpression Switch(Type type, Expression switchValue, Expression defaultBody, MethodInfo comparison, IEnumerable cases) { - Contract.Requires(type != null); - Contract.Ensures(Contract.Result() != null); - return default(ParameterExpression); + Contract.Requires(switchValue != null); + Contract.Requires(cases != null); + Contract.Ensures(Contract.Result() != null); + return default(SwitchExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents raising - // a number to a power. + // Creates a System.Linq.Expressions.SwitchExpression that represents a switch statement + // that has a default case.. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. + // type: + // The result type of the switch. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // switchValue: + // The value to be tested against each case. // - // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Power and the System.Linq.Expressions.BinaryExpression.Left - // and System.Linq.Expressions.BinaryExpression.Right properties set to the - // specified values. + // defaultBody: + // The result of the switch if switchValue does not match any of the cases. // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. + // comparison: + // The equality comparison method to use. // - // System.InvalidOperationException: - // The exponentiation operator is not defined for left.Type and right.Type. - // -or- left.Type and/or right.Type are not System.Double. + // cases: + // The set of cases for this switch expression. + // + // Returns: + // The created System.Linq.Expressions.SwitchExpression. [Pure] - public static BinaryExpression Power(Expression left, Expression right) + public static SwitchExpression Switch(Type type, Expression switchValue, Expression defaultBody, MethodInfo comparison, params SwitchCase[] cases) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(switchValue != null); + Contract.Requires(cases != null); + Contract.Requires(cases.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(SwitchExpression); } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents raising - // a number to a power. The implementing method can be specified. + // Creates a System.Linq.Expressions.SwitchCase object to be used in a System.Linq.Expressions.SwitchExpression + // object. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. - // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // body: + // The body of the case. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method - // property equal to. + // testValues: + // The test values of the case. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Power and the System.Linq.Expressions.BinaryExpression.Left, - // System.Linq.Expressions.BinaryExpression.Right, and System.Linq.Expressions.BinaryExpression.Method - // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. - // - // System.InvalidOperationException: - // method is null and the exponentiation operator is not defined for left.Type - // and right.Type. -or- method is null and left.Type and/or right.Type are - // not System.Double. + // The created System.Linq.Expressions.SwitchCase. [Pure] - public static BinaryExpression Power(Expression left, Expression right, MethodInfo method) + public static SwitchCase SwitchCase(Expression body, IEnumerable testValues) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(body != null); + Contract.Requires(testValues != null); + Contract.Ensures(Contract.Result() != null); + return default(SwitchCase); } // // Summary: - // Creates a System.Linq.Expressions.MemberExpression that represents accessing - // a property by using a property accessor method. + // Creates a System.Linq.Expressions.SwitchCase for use in a System.Linq.Expressions.SwitchExpression. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.MemberExpression.Expression - // property equal to. + // body: + // The body of the case. // - // propertyAccessor: - // The System.Reflection.MethodInfo that represents a property accessor method. + // testValues: + // The test values of the case. // // Returns: - // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.MemberAccess, the - // System.Linq.Expressions.MemberExpression.Expression property set to expression - // and the System.Linq.Expressions.MemberExpression.Member property set to the - // System.Reflection.PropertyInfo that represents the property accessed in propertyAccessor. + // The created System.Linq.Expressions.SwitchCase. + [Pure] + public static SwitchCase SwitchCase(Expression body, params Expression[] testValues) + { + Contract.Requires(body != null); + Contract.Requires(testValues != null); + Contract.Requires(testValues.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(SwitchCase); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // - // Exceptions: - // System.ArgumentNullException: - // propertyAccessor is null. -or- The method that propertyAccessor represents - // is not static (Shared in Visual Basic) and expression is null. + // Summary: + // Creates an instance of System.Linq.Expressions.SymbolDocumentInfo. // - // System.ArgumentException: - // expression.Type is not assignable to the declaring type of the method represented - // by propertyAccessor. -or- The method that propertyAccessor represents is - // not a property accessor method. + // Parameters: + // fileName: + // A System.String to set the System.Linq.Expressions.SymbolDocumentInfo.FileName + // equal to. + // + // Returns: + // A System.Linq.Expressions.SymbolDocumentInfo that has the System.Linq.Expressions.SymbolDocumentInfo.FileName + // property set to the specified value. [Pure] - public static MemberExpression Property(Expression expression, MethodInfo propertyAccessor) + public static SymbolDocumentInfo SymbolDocument(string fileName) { - Contract.Requires(propertyAccessor != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberExpression); + Contract.Requires(fileName != null); + Contract.Ensures(Contract.Result() != null); + return default(SymbolDocumentInfo); } // // Summary: - // Creates a System.Linq.Expressions.MemberExpression that represents accessing - // a property. + // Creates an instance of System.Linq.Expressions.SymbolDocumentInfo. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.MemberExpression.Expression - // property equal to. + // fileName: + // A System.String to set the System.Linq.Expressions.SymbolDocumentInfo.FileName + // equal to. // - // property: - // The System.Reflection.PropertyInfo to set the System.Linq.Expressions.MemberExpression.Member - // property equal to. + // language: + // A System.Guid to set the System.Linq.Expressions.SymbolDocumentInfo.Language + // equal to. // // Returns: - // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.MemberAccess and - // the System.Linq.Expressions.MemberExpression.Expression and System.Linq.Expressions.MemberExpression.Member - // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // property is null. -or- The property that property represents is not static - // (Shared in Visual Basic) and expression is null. - // - // System.ArgumentException: - // expression.Type is not assignable to the declaring type of the property that - // property represents. + // A System.Linq.Expressions.SymbolDocumentInfo that has the System.Linq.Expressions.SymbolDocumentInfo.FileName + // and System.Linq.Expressions.SymbolDocumentInfo.Language properties set to the + // specified value. [Pure] - public static MemberExpression Property(Expression expression, PropertyInfo property) + public static SymbolDocumentInfo SymbolDocument(string fileName, Guid language) { - Contract.Requires(property != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberExpression); + Contract.Requires(fileName != null); + Contract.Ensures(Contract.Result() != null); + return default(SymbolDocumentInfo); } // // Summary: - // Creates a System.Linq.Expressions.MemberExpression that represents accessing - // a property given the name of the property. + // Creates an instance of System.Linq.Expressions.SymbolDocumentInfo. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression whose System.Linq.Expressions.Expression.Type - // contains a property named propertyName. - // - // propertyName: - // The name of a property. + // fileName: + // A System.String to set the System.Linq.Expressions.SymbolDocumentInfo.FileName + // equal to. // - // Returns: - // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.MemberAccess, the - // System.Linq.Expressions.MemberExpression.Expression property set to expression, - // and the System.Linq.Expressions.MemberExpression.Member property set to the - // System.Reflection.PropertyInfo that represents the property denoted by propertyName. + // language: + // A System.Guid to set the System.Linq.Expressions.SymbolDocumentInfo.Language + // equal to. // - // Exceptions: - // System.ArgumentNullException: - // expression or propertyName is null. + // languageVendor: + // A System.Guid to set the System.Linq.Expressions.SymbolDocumentInfo.LanguageVendor + // equal to. // - // System.ArgumentException: - // No property named propertyName is defined in expression.Type or its base - // types. + // Returns: + // A System.Linq.Expressions.SymbolDocumentInfo that has the System.Linq.Expressions.SymbolDocumentInfo.FileName + // and System.Linq.Expressions.SymbolDocumentInfo.Language and System.Linq.Expressions.SymbolDocumentInfo.LanguageVendor + // properties set to the specified value. [Pure] - public static MemberExpression Property(Expression expression, string propertyName) + public static SymbolDocumentInfo SymbolDocument(string fileName, Guid language, Guid languageVendor) { - Contract.Requires(propertyName != null); - Contract.Requires(expression != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberExpression); + Contract.Requires(fileName != null); + Contract.Ensures(Contract.Result() != null); + return default(SymbolDocumentInfo); } // // Summary: - // Creates a System.Linq.Expressions.MemberExpression that represents accessing - // a property or field given the name of the property or field. + // Creates an instance of System.Linq.Expressions.SymbolDocumentInfo. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression whose System.Linq.Expressions.Expression.Type - // contains a property or field named propertyOrFieldName. + // fileName: + // A System.String to set the System.Linq.Expressions.SymbolDocumentInfo.FileName + // equal to. // - // propertyOrFieldName: - // The name of a property or field. + // language: + // A System.Guid to set the System.Linq.Expressions.SymbolDocumentInfo.Language + // equal to. // - // Returns: - // A System.Linq.Expressions.MemberExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.MemberAccess, the - // System.Linq.Expressions.MemberExpression.Expression property set to expression, - // and the System.Linq.Expressions.MemberExpression.Member property set to the - // System.Reflection.PropertyInfo or System.Reflection.FieldInfo that represents - // the property or field denoted by propertyOrFieldName. + // languageVendor: + // A System.Guid to set the System.Linq.Expressions.SymbolDocumentInfo.LanguageVendor + // equal to. // - // Exceptions: - // System.ArgumentNullException: - // expression or propertyOrFieldName is null. + // documentType: + // A System.Guid to set the System.Linq.Expressions.SymbolDocumentInfo.DocumentType + // equal to. // - // System.ArgumentException: - // No property or field named propertyOrFieldName is defined in expression.Type - // or its base types. + // Returns: + // A System.Linq.Expressions.SymbolDocumentInfo that has the System.Linq.Expressions.SymbolDocumentInfo.FileName + // and System.Linq.Expressions.SymbolDocumentInfo.Language and System.Linq.Expressions.SymbolDocumentInfo.LanguageVendor + // and System.Linq.Expressions.SymbolDocumentInfo.DocumentType properties set to + // the specified value. [Pure] - public static MemberExpression PropertyOrField(Expression expression, string propertyOrFieldName) + public static SymbolDocumentInfo SymbolDocument(string fileName, Guid language, Guid languageVendor, Guid documentType) { - Contract.Requires(expression != null); - Contract.Requires(propertyOrFieldName != null); - Contract.Ensures(Contract.Result() != null); - return default(MemberExpression); + Contract.Requires(fileName != null); + Contract.Ensures(Contract.Result() != null); + return default(SymbolDocumentInfo); } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.UnaryExpression that represents an expression - // that has a constant value of type System.Linq.Expressions.Expression. + // Creates a System.Linq.Expressions.UnaryExpression that represents a throwing + // of an exception. // // Parameters: - // expression: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.UnaryExpression.Operand - // property equal to. + // value: + // An System.Linq.Expressions.Expression. // // Returns: - // A System.Linq.Expressions.UnaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Quote and the System.Linq.Expressions.UnaryExpression.Operand - // property set to the specified value. - // - // Exceptions: - // System.ArgumentNullException: - // expression is null. + // A System.Linq.Expressions.UnaryExpression that represents the exception. [Pure] - public static UnaryExpression Quote(Expression expression) + public static UnaryExpression Throw(Expression value) { - Contract.Requires(expression != null); + Contract.Requires(value != null); Contract.Ensures(Contract.Result() != null); return default(UnaryExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise - // right-shift operation. + // Creates a System.Linq.Expressions.UnaryExpression that represents a throwing + // of an exception with a given type. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. + // value: + // An System.Linq.Expressions.Expression. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // type: + // The new System.Type of the expression. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.RightShift and the - // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right - // properties set to the specified values. + // A System.Linq.Expressions.UnaryExpression that represents the exception. + [Pure] + public static UnaryExpression Throw(Expression value, Type type) + { + Contract.Requires(value != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.TryExpression representing a try block with + // any number of catch statements and neither a fault nor finally block. // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. + // Parameters: + // body: + // The body of the try block. // - // System.InvalidOperationException: - // The right-shift operator is not defined for left.Type and right.Type. + // handlers: + // The array of zero or more System.Linq.Expressions.CatchBlock expressions representing + // the catch statements to be associated with the try block. + // + // Returns: + // The created System.Linq.Expressions.TryExpression. [Pure] - public static BinaryExpression RightShift(Expression left, Expression right) + public static TryExpression TryCatch(Expression body, params CatchBlock[] handlers) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(body != null); + Contract.Requires(handlers != null); + Contract.Requires(handlers.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(TryExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents a bitwise - // right-shift operation. The implementing method can be specified. + // Creates a System.Linq.Expressions.TryExpression representing a try block with + // any number of catch statements and a finally block. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. + // body: + // The body of the try block. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // finally: + // The body of the finally block. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method - // property equal to. + // handlers: + // The array of zero or more System.Linq.Expressions.CatchBlock expressions representing + // the catch statements to be associated with the try block. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.RightShift and the - // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // and System.Linq.Expressions.BinaryExpression.Method properties set to the - // specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. - // - // System.InvalidOperationException: - // method is null and the right-shift operator is not defined for left.Type - // and right.Type. + // The created System.Linq.Expressions.TryExpression. [Pure] - public static BinaryExpression RightShift(Expression left, Expression right, MethodInfo method) + public static TryExpression TryCatchFinally(Expression body, Expression @finally, params CatchBlock[] handlers) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(body != null); + Contract.Requires(@finally != null || handlers != null && handlers.Length >= 1); + Contract.Ensures(Contract.Result() != null); + return default(TryExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // subtraction operation that does not have overflow checking. + // Creates a System.Linq.Expressions.TryExpression representing a try block with + // a fault block and no catch statements. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. + // body: + // The body of the try block. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // fault: + // The body of the fault block. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Subtract and the - // System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right - // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.InvalidOperationException: - // The subtraction operator is not defined for left.Type and right.Type. + // The created System.Linq.Expressions.TryExpression. [Pure] - public static BinaryExpression Subtract(Expression left, Expression right) + public static TryExpression TryFault(Expression body, Expression fault) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(body != null); + Contract.Requires(fault != null); + Contract.Ensures(Contract.Result() != null); + return default(TryExpression); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // subtraction operation that does not have overflow checking. The implementing - // method can be specified. + // Creates a System.Linq.Expressions.TryExpression representing a try block with + // a finally block and no catch statements. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. - // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // body: + // The body of the try block. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method - // property equal to. + // finally: + // The body of the finally block. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.Subtract and the - // System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // and System.Linq.Expressions.BinaryExpression.Method properties set to the - // specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. - // - // System.InvalidOperationException: - // method is null and the subtraction operator is not defined for left.Type - // and right.Type. + // The created System.Linq.Expressions.TryExpression. [Pure] - public static BinaryExpression Subtract(Expression left, Expression right, MethodInfo method) + public static TryExpression TryFinally(Expression body, Expression @finally) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(body != null); + Contract.Requires(@finally != null); + Contract.Ensures(Contract.Result() != null); + return default(TryExpression); } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // subtraction operation that has overflow checking. + // Creates a System.Linq.Expressions.Expression.Type object that represents a generic + // System.Action delegate type that has specific type arguments. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. + // typeArgs: + // An array of Type objects that specify the type arguments for the System.Action + // delegate type. // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // actionType: + // When this method returns, contains the generic System.Action delegate type that + // has specific type arguments. Contains null if there is no generic System.Action + // delegate that matches the typeArgs.This parameter is passed uninitialized. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.SubtractChecked - // and the System.Linq.Expressions.BinaryExpression.Left and System.Linq.Expressions.BinaryExpression.Right - // properties set to the specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.InvalidOperationException: - // The subtraction operator is not defined for left.Type and right.Type. + // true if generic System.Action delegate type was created for specific typeArgs; + // false otherwise. [Pure] - public static BinaryExpression SubtractChecked(Expression left, Expression right) + public static bool TryGetActionType(Type[] typeArgs, out Type actionType) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(typeArgs != null); + Contract.Requires(typeArgs.Length <= 16); + Contract.Ensures(!Contract.Result() || Contract.ValueAtReturn(out actionType) != null); + actionType = default(Type); + return default(bool); } // // Summary: - // Creates a System.Linq.Expressions.BinaryExpression that represents an arithmetic - // subtraction operation that has overflow checking. The implementing method - // can be specified. + // Creates a System.Linq.Expressions.Expression.Type object that represents a generic + // System.Func delegate type that has specific type arguments. The last type argument + // specifies the return type of the created delegate. // // Parameters: - // left: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Left - // property equal to. - // - // right: - // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.BinaryExpression.Right - // property equal to. + // typeArgs: + // An array of Type objects that specify the type arguments for the System.Func + // delegate type. // - // method: - // A System.Reflection.MethodInfo to set the System.Linq.Expressions.BinaryExpression.Method - // property equal to. + // funcType: + // When this method returns, contains the generic System.Func delegate type that + // has specific type arguments. Contains null if there is no generic System.Func + // delegate that matches the typeArgs.This parameter is passed uninitialized. // // Returns: - // A System.Linq.Expressions.BinaryExpression that has the System.Linq.Expressions.Expression.NodeType - // property equal to System.Linq.Expressions.ExpressionType.SubtractChecked - // and the System.Linq.Expressions.BinaryExpression.Left, System.Linq.Expressions.BinaryExpression.Right, - // and System.Linq.Expressions.BinaryExpression.Method properties set to the - // specified values. - // - // Exceptions: - // System.ArgumentNullException: - // left or right is null. - // - // System.ArgumentException: - // method is not null and the method it represents returns void, is not static - // (Shared in Visual Basic), or does not take exactly two arguments. - // - // System.InvalidOperationException: - // method is null and the subtraction operator is not defined for left.Type - // and right.Type. + // true if generic System.Func delegate type was created for specific typeArgs; + // false otherwise. [Pure] - public static BinaryExpression SubtractChecked(Expression left, Expression right, MethodInfo method) + public static bool TryGetFuncType(Type[] typeArgs, out Type funcType) { - Contract.Requires(left != null); - Contract.Requires(right != null); - Contract.Ensures(Contract.Result() != null); - return default(BinaryExpression); + Contract.Requires(typeArgs != null); + Contract.Requires(typeArgs.Length >= 1); + Contract.Requires(typeArgs.Length <= 17); + Contract.Ensures(!Contract.Result() || Contract.ValueAtReturn(out funcType) != null); + funcType = default(Type); + return default(bool); } +#endif + // // Summary: // Creates a System.Linq.Expressions.UnaryExpression that represents an explicit @@ -5419,6 +10115,35 @@ public static UnaryExpression TypeAs(Expression expression, Type type) Contract.Ensures(Contract.Result() != null); return default(UnaryExpression); } +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.TypeBinaryExpression that compares run-time + // type identity. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to set the System.Linq.Expressions.Expression + // property equal to. + // + // type: + // A System.Linq.Expressions.Expression.Type to set the System.Linq.Expressions.TypeBinaryExpression.TypeOperand + // property equal to. + // + // Returns: + // A System.Linq.Expressions.TypeBinaryExpression for which the System.Linq.Expressions.Expression.NodeType + // property is equal to System.Linq.Expressions.Expression.TypeEqual(System.Linq.Expressions.Expression,System.Type) + // and for which the System.Linq.Expressions.Expression and System.Linq.Expressions.TypeBinaryExpression.TypeOperand + // properties are set to the specified values. + [Pure] + public static TypeBinaryExpression TypeEqual(Expression expression, Type type) + { + Contract.Requires(expression != null); + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(TypeBinaryExpression); + } +#endif // // Summary: // Creates a System.Linq.Expressions.TypeBinaryExpression. @@ -5449,6 +10174,7 @@ public static TypeBinaryExpression TypeIs(Expression expression, Type type) Contract.Ensures(Contract.Result() != null); return default(TypeBinaryExpression); } + // // Summary: // Creates a System.Linq.Expressions.UnaryExpression that represents a unary @@ -5518,7 +10244,33 @@ public static UnaryExpression UnaryPlus(Expression expression, MethodInfo method Contract.Ensures(Contract.Result() != null); return default(UnaryExpression); } -#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a System.Linq.Expressions.UnaryExpression that represents an explicit + // unboxing. + // + // Parameters: + // expression: + // An System.Linq.Expressions.Expression to unbox. + // + // type: + // The new System.Type of the expression. + // + // Returns: + // An instance of System.Linq.Expressions.UnaryExpression. + [Pure] + public static UnaryExpression Unbox(Expression expression, Type type) + { + Contract.Requires(expression != null); + Contract.Requires(type != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // // Summary: // Creates a System.Linq.Expressions.ParameterExpression node that can be used @@ -5574,6 +10326,50 @@ public TDelegate Compile() } #endif +#if NETFRAMEWORK_4_0 + // + // Summary: + // Produces a delegate that represents the lambda expression. + // + // Parameters: + // debugInfoGenerator: + // Debugging information generator used by the compiler to mark sequence points + // and annotate local variables. + // + // Returns: + // A delegate containing the compiled version of the lambda. + public TDelegate Compile(DebugInfoGenerator debugInfoGenerator) + { + Contract.Requires(debugInfoGenerator != null); + Contract.Ensures(!ReferenceEquals(Contract.Result(), null)); + return default(TDelegate); + } +#endif + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // body: + // The System.Linq.Expressions.LambdaExpression.Body property of the result. + // + // parameters: + // The System.Linq.Expressions.LambdaExpression.Parameters property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public Expression Update(Expression body, IEnumerable parameters) + { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result>() != null); + return default(Expression); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.GotoExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.GotoExpression.cs index 9e1cc15a..0f6f1f0d 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.GotoExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.GotoExpression.cs @@ -68,8 +68,12 @@ protected internal override Expression Accept (ExpressionVisitor visitor) return default(Expression); } + [Pure] public GotoExpression Update (LabelTarget target, Expression value) { + Contract.Requires(target != null); + Contract.Requires(value != null || target.Type == typeof(void), "Label type must be void when no value is provided"); + Contract.Ensures(Contract.Result() != null); return default(GotoExpression); } #endregion @@ -95,6 +99,7 @@ public LabelTarget Target { get { + Contract.Ensures(Contract.Result() != null); return default(LabelTarget); } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.IndexExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.IndexExpression.cs index b62a982b..a7035db1 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.IndexExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.IndexExpression.cs @@ -15,11 +15,12 @@ #if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // File System.Linq.Expressions.IndexExpression.cs // Automatically generated contract file. +using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.IO; using System.Text; -using System.Diagnostics.Contracts; -using System; // Disable the "this variable is not used" warning as every field would imply it. #pragma warning disable 0414 @@ -49,18 +50,21 @@ protected internal override Expression Accept (ExpressionVisitor visitor) return default(Expression); } + [Pure] public IndexExpression Update (Expression @object, IEnumerable arguments) { + Contract.Ensures(Contract.Result() != null); return default(IndexExpression); } #endregion #region Properties and indexers - public System.Collections.ObjectModel.ReadOnlyCollection Arguments + public ReadOnlyCollection Arguments { get { - return default(System.Collections.ObjectModel.ReadOnlyCollection); + Contract.Ensures(Contract.Result>() != null); + return default(ReadOnlyCollection); } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.InvocationExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.InvocationExpression.cs index 0b93662e..f65be653 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.InvocationExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.InvocationExpression.cs @@ -13,9 +13,10 @@ // 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; +using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Text; using System.Diagnostics.Contracts; +using System.Text; namespace System.Linq.Expressions { @@ -55,5 +56,30 @@ public Expression Expression return default(Expression); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // expression: + // The System.Linq.Expressions.InvocationExpression.Expression property of the result. + // + // arguments: + // The System.Linq.Expressions.InvocationExpression.Arguments property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public InvocationExpression Update(Expression expression, IEnumerable arguments) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(InvocationExpression); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LabelExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LabelExpression.cs index 8a2b97f2..0fe11d7c 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LabelExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LabelExpression.cs @@ -49,8 +49,11 @@ protected internal override Expression Accept (ExpressionVisitor visitor) return default(Expression); } + [Pure] public LabelExpression Update (LabelTarget target, Expression defaultValue) { + Contract.Requires(target != null); + Contract.Ensures(Contract.Result() != null); return default(LabelExpression); } #endregion @@ -76,6 +79,7 @@ public LabelTarget Target { get { + Contract.Ensures(Contract.Result() != null); return default(LabelTarget); } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LambdaExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LambdaExpression.cs index e86b1697..b36a066a 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LambdaExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LambdaExpression.cs @@ -14,8 +14,13 @@ using System; using System.Collections.ObjectModel; -using System.Text; using System.Diagnostics.Contracts; +using System.Runtime.CompilerServices; +using System.Text; + +#if NETFRAMEWORK_4_0 +using System.Reflection.Emit; +#endif namespace System.Linq.Expressions { @@ -55,6 +60,23 @@ public ReadOnlyCollection Parameters } } +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Gets the return type of the lambda expression. + // + // Returns: + // The System.Type object representing the type of the lambda expression. + public Type ReturnType + { + get + { + Contract.Ensures(Contract.Result() != null); + return default(Type); + } + } +#endif + #if !SILVERLIGHT_4_0_WP // Summary: // Produces a delegate that represents the lambda expression. @@ -68,5 +90,58 @@ public Delegate Compile() return default(Delegate); } #endif + +#if NETFRAMEWORK_4_0 + // + // Summary: + // Produces a delegate that represents the lambda expression. + // + // Parameters: + // debugInfoGenerator: + // Debugging information generator used by the compiler to mark sequence points + // and annotate local variables. + // + // Returns: + // A delegate containing the compiled version of the lambda. + public Delegate Compile(DebugInfoGenerator debugInfoGenerator) + { + Contract.Requires(debugInfoGenerator != null); + Contract.Ensures(Contract.Result() != null); + return default(Delegate); + } + + // + // Summary: + // Compiles the lambda into a method definition. + // + // Parameters: + // method: + // A System.Reflection.Emit.MethodBuilder which will be used to hold the lambda's + // IL. + public void CompileToMethod(MethodBuilder method) + { + Contract.Requires(method != null); + Contract.Requires(method.IsStatic); + } + + // + // Summary: + // Compiles the lambda into a method definition and custom debug information. + // + // Parameters: + // method: + // A System.Reflection.Emit.MethodBuilder which will be used to hold the lambda's + // IL. + // + // debugInfoGenerator: + // Debugging information generator used by the compiler to mark sequence points + // and annotate local variables. + public void CompileToMethod(MethodBuilder method, DebugInfoGenerator debugInfoGenerator) + { + Contract.Requires(method != null); + Contract.Requires(method.IsStatic); + Contract.Requires(debugInfoGenerator != null); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ListInitExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ListInitExpression.cs index 9d9e8c6e..9b0e71be 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ListInitExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.ListInitExpression.cs @@ -13,9 +13,10 @@ // 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; +using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Text; using System.Diagnostics.Contracts; +using System.Text; namespace System.Linq.Expressions { @@ -36,6 +37,7 @@ public ReadOnlyCollection Initializers get { Contract.Ensures(Contract.Result>() != null); + Contract.Ensures(Contract.Result>().Count >= 1); return default(ReadOnlyCollection); } } @@ -55,5 +57,32 @@ public NewExpression NewExpression return default(NewExpression); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // newExpression: + // The System.Linq.Expressions.ListInitExpression.NewExpression property of the + // result. + // + // initializers: + // The System.Linq.Expressions.ListInitExpression.Initializers property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public ListInitExpression Update(NewExpression newExpression, IEnumerable initializers) + { + Contract.Requires(newExpression != null); + Contract.Requires(initializers != null); + Contract.Ensures(Contract.Result() != null); + return default(ListInitExpression); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LoopExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LoopExpression.cs index 30bff58e..9722a5b0 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LoopExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.LoopExpression.cs @@ -49,8 +49,12 @@ protected internal override Expression Accept (ExpressionVisitor visitor) return default(Expression); } + [Pure] public LoopExpression Update (LabelTarget breakLabel, LabelTarget continueLabel, Expression body) { + Contract.Requires(body != null); + Contract.Requires(continueLabel == null || continueLabel.Type == typeof(void), "Continue label type must be void"); + Contract.Ensures(Contract.Result() != null); return default(LoopExpression); } #endregion @@ -60,6 +64,7 @@ public Expression Body { get { + Contract.Ensures(Contract.Result() != null); return default(Expression); } } @@ -76,6 +81,7 @@ public LabelTarget ContinueLabel { get { + Contract.Ensures(Contract.Result() == null || Contract.Result().Type == typeof(void)); return default(LabelTarget); } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberAssignment.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberAssignment.cs index f7164184..74731e82 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberAssignment.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberAssignment.cs @@ -39,5 +39,27 @@ public Expression Expression return default(Expression); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // expression: + // The System.Linq.Expressions.MemberAssignment.Expression property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public MemberAssignment Update(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberAssignment); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberExpression.cs index 024d057d..f316c036 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberExpression.cs @@ -1,57 +1,79 @@ -// CodeContracts -// -// Copyright (c) Microsoft Corporation -// -// All rights reserved. -// -// MIT License -// -// 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; -using System.Reflection; -using System.Text; -using System.Diagnostics.Contracts; - -namespace System.Linq.Expressions -{ - // Summary: - // Represents accessing a field or property. - public sealed class MemberExpression : Expression - { - private MemberExpression() { } - // Summary: - // Gets the containing object of the field or property. - // - // Returns: - // An System.Linq.Expressions.Expression that represents the containing object - // of the field or property. - public Expression Expression - { - get - { - // can be null for static fields - return default(Expression); - } - } - // - // Summary: - // Gets the field or property to be accessed. - // - // Returns: - // The System.Reflection.MemberInfo that represents the field or property to - // be accessed. - public MemberInfo Member - { - get - { - Contract.Ensures(Contract.Result() != null); - return default(MemberInfo); - } - } - } -} +// CodeContracts +// +// Copyright (c) Microsoft Corporation +// +// All rights reserved. +// +// MIT License +// +// 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; +using System.Reflection; +using System.Text; +using System.Diagnostics.Contracts; + +namespace System.Linq.Expressions +{ + // Summary: + // Represents accessing a field or property. + public sealed class MemberExpression : Expression + { + private MemberExpression() { } + // Summary: + // Gets the containing object of the field or property. + // + // Returns: + // An System.Linq.Expressions.Expression that represents the containing object + // of the field or property. + public Expression Expression + { + get + { + // can be null for static fields + return default(Expression); + } + } + // + // Summary: + // Gets the field or property to be accessed. + // + // Returns: + // The System.Reflection.MemberInfo that represents the field or property to + // be accessed. + public MemberInfo Member + { + get + { + Contract.Ensures(Contract.Result() != null); + Contract.Ensures(Contract.Result() is FieldInfo || Contract.Result() is PropertyInfo); + return default(MemberInfo); + } + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // expression: + // The System.Linq.Expressions.MemberExpression.Expression property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public MemberExpression Update(Expression expression) + { + Contract.Ensures(Contract.Result() != null); + return default(MemberExpression); + } +#endif + } +} diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberInitExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberInitExpression.cs index 4fe6cf89..10685eeb 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberInitExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberInitExpression.cs @@ -13,9 +13,10 @@ // 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; +using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Text; using System.Diagnostics.Contracts; +using System.Text; namespace System.Linq.Expressions { @@ -37,6 +38,7 @@ public ReadOnlyCollection Bindings get { Contract.Ensures(Contract.Result>() != null); + Contract.Ensures(Contract.Result>().Count >= 1); return default(ReadOnlyCollection); } } @@ -54,5 +56,32 @@ public NewExpression NewExpression return default(NewExpression); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // newExpression: + // The System.Linq.Expressions.MemberInitExpression.NewExpression property of the + // result. + // + // bindings: + // The System.Linq.Expressions.MemberInitExpression.Bindings property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public MemberInitExpression Update(NewExpression newExpression, IEnumerable bindings) + { + Contract.Requires(newExpression != null); + Contract.Requires(bindings != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberInitExpression); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberListBinding.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberListBinding.cs index 2f38967c..e705fbc3 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberListBinding.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberListBinding.cs @@ -13,10 +13,11 @@ // 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; +using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.Reflection; using System.Text; -using System.Diagnostics.Contracts; namespace System.Linq.Expressions { @@ -39,8 +40,31 @@ public ReadOnlyCollection Initializers get { Contract.Ensures(Contract.Result>() != null); + Contract.Ensures(Contract.Result>().Count >= 1); return default(ReadOnlyCollection); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // initializers: + // The System.Linq.Expressions.MemberListBinding.Initializers property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public MemberListBinding Update(IEnumerable initializers) + { + Contract.Requires(initializers != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberListBinding); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberMemberBinding.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberMemberBinding.cs index e17c3e04..e7b6bd16 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberMemberBinding.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MemberMemberBinding.cs @@ -13,10 +13,11 @@ // 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; +using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.Reflection; using System.Text; -using System.Diagnostics.Contracts; namespace System.Linq.Expressions { @@ -37,8 +38,31 @@ public ReadOnlyCollection Bindings get { Contract.Ensures(Contract.Result>() != null); + Contract.Ensures(Contract.Result>().Count >= 1); return default(ReadOnlyCollection); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // bindings: + // The System.Linq.Expressions.MemberMemberBinding.Bindings property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public MemberMemberBinding Update(IEnumerable bindings) + { + Contract.Requires(bindings != null); + Contract.Ensures(Contract.Result() != null); + return default(MemberMemberBinding); + } +#endif } } \ No newline at end of file diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MethodCallExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MethodCallExpression.cs index 6c42790a..94060356 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MethodCallExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.MethodCallExpression.cs @@ -13,10 +13,11 @@ // 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; +using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.Reflection; using System.Text; -using System.Diagnostics.Contracts; namespace System.Linq.Expressions { @@ -52,6 +53,8 @@ public MethodInfo Method get { Contract.Ensures(Contract.Result() != null); + Contract.Ensures(!Contract.Result().IsGenericMethodDefinition); + Contract.Ensures(!Contract.Result().ContainsGenericParameters); return default(MethodInfo); } } @@ -62,6 +65,40 @@ public MethodInfo Method // Returns: // An System.Linq.Expressions.Expression that represents the receiving object // of the method. - extern public Expression Object { get; } + public Expression Object + { + get + { + Contract.Ensures(Method.IsStatic || Contract.Result() != null); + Contract.Ensures(!Method.IsStatic || Contract.Result() == null); + return default(Expression); + } + } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // object: + // The System.Linq.Expressions.MethodCallExpression.Object property of the result. + // + // arguments: + // The System.Linq.Expressions.MethodCallExpression.Arguments property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public MethodCallExpression Update(Expression @object, IEnumerable arguments) + { + Contract.Requires(Method.IsStatic || @object != null); + Contract.Requires(!Method.IsStatic || @object == null); + Contract.Ensures(Contract.Result() != null); + return default(MethodCallExpression); + } +#endif } -} +} \ No newline at end of file diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.NewArrayExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.NewArrayExpression.cs index e0bd216c..460fc617 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.NewArrayExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.NewArrayExpression.cs @@ -13,9 +13,10 @@ // 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; +using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Text; using System.Diagnostics.Contracts; +using System.Text; namespace System.Linq.Expressions { @@ -41,8 +42,31 @@ public ReadOnlyCollection Expressions get { Contract.Ensures(Contract.Result>() != null); + Contract.Ensures(Contract.Result>().Count >= 1); return default(ReadOnlyCollection); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // expressions: + // The System.Linq.Expressions.NewArrayExpression.Expressions property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public NewArrayExpression Update(IEnumerable expressions) + { + Contract.Requires(expressions != null); + Contract.Ensures(Contract.Result() != null); + return default(NewArrayExpression); + } +#endif } } \ No newline at end of file diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.NewExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.NewExpression.cs index 3b8bfb24..78eaf670 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.NewExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.NewExpression.cs @@ -13,10 +13,11 @@ // 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; +using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.Reflection; using System.Text; -using System.Diagnostics.Contracts; namespace System.Linq.Expressions { @@ -71,5 +72,26 @@ public ReadOnlyCollection Members return default(ReadOnlyCollection); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // arguments: + // The System.Linq.Expressions.NewExpression.Arguments property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public NewExpression Update(IEnumerable arguments) + { + Contract.Ensures(Contract.Result() != null); + return default(NewExpression); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.RuntimeVariablesExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.RuntimeVariablesExpression.cs index 05215840..204a4dba 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.RuntimeVariablesExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.RuntimeVariablesExpression.cs @@ -15,11 +15,12 @@ #if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // File System.Linq.Expressions.RuntimeVariablesExpression.cs // Automatically generated contract file. +using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.IO; using System.Text; -using System.Diagnostics.Contracts; -using System; // Disable the "this variable is not used" warning as every field would imply it. #pragma warning disable 0414 @@ -49,8 +50,11 @@ protected internal override Expression Accept (ExpressionVisitor visitor) return default(Expression); } + [Pure] public RuntimeVariablesExpression Update (IEnumerable variables) { + Contract.Requires(variables != null); + Contract.Ensures(Contract.Result() != null); return default(RuntimeVariablesExpression); } #endregion @@ -72,11 +76,13 @@ public override Type Type } } - public System.Collections.ObjectModel.ReadOnlyCollection Variables + public ReadOnlyCollection Variables { get { - return default(System.Collections.ObjectModel.ReadOnlyCollection); + Contract.Ensures(Contract.Result>() != null); + Contract.Ensures(Contract.Result>().Count >= 1); + return default(ReadOnlyCollection); } } #endregion diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SwitchCase.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SwitchCase.cs index a27bc423..9e423066 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SwitchCase.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SwitchCase.cs @@ -15,11 +15,12 @@ #if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // File System.Linq.Expressions.SwitchCase.cs // Automatically generated contract file. +using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.IO; using System.Text; -using System.Diagnostics.Contracts; -using System; // Disable the "this variable is not used" warning as every field would imply it. #pragma warning disable 0414 @@ -44,8 +45,12 @@ sealed public partial class SwitchCase #region Methods and constructors private SwitchCase() {} + [Pure] public SwitchCase Update (IEnumerable testValues, Expression body) { + Contract.Requires(body != null); + Contract.Requires(testValues != null); + Contract.Ensures(Contract.Result() != null); return default(SwitchCase); } #endregion @@ -55,15 +60,18 @@ public Expression Body { get { + Contract.Ensures(Contract.Result() != null); return default(Expression); } } - public System.Collections.ObjectModel.ReadOnlyCollection TestValues + public ReadOnlyCollection TestValues { get { - return default(System.Collections.ObjectModel.ReadOnlyCollection); + Contract.Ensures(Contract.Result>() != null); + Contract.Ensures(Contract.Result>().Count >= 1); + return default(ReadOnlyCollection); } } #endregion diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SwitchExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SwitchExpression.cs index 5f8d579a..ff4af17f 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SwitchExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SwitchExpression.cs @@ -15,11 +15,12 @@ #if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // File System.Linq.Expressions.SwitchExpression.cs // Automatically generated contract file. +using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.IO; using System.Text; -using System.Diagnostics.Contracts; -using System; // Disable the "this variable is not used" warning as every field would imply it. #pragma warning disable 0414 @@ -49,18 +50,24 @@ protected internal override Expression Accept (ExpressionVisitor visitor) return default(Expression); } + [Pure] public SwitchExpression Update (Expression switchValue, IEnumerable cases, Expression defaultBody) { + Contract.Requires(switchValue != null); + Contract.Requires(cases != null); + Contract.Ensures(Contract.Result() != null); return default(SwitchExpression); } #endregion #region Properties and indexers - public System.Collections.ObjectModel.ReadOnlyCollection Cases + public ReadOnlyCollection Cases { get { - return default(System.Collections.ObjectModel.ReadOnlyCollection); + Contract.Ensures(Contract.Result>() != null); + Contract.Ensures(Contract.Result>().Count >= 1); + return default(ReadOnlyCollection); } } @@ -92,6 +99,7 @@ public Expression SwitchValue { get { + Contract.Ensures(Contract.Result() != null); return default(Expression); } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SymbolDocumentInfo.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SymbolDocumentInfo.cs index c27cf1fe..b72fcda8 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SymbolDocumentInfo.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.SymbolDocumentInfo.cs @@ -56,6 +56,7 @@ public string FileName { get { + Contract.Ensures(Contract.Result() != null); return default(string); } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.TryExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.TryExpression.cs index 72d0c582..557119c5 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.TryExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.TryExpression.cs @@ -15,11 +15,12 @@ #if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 // File System.Linq.Expressions.TryExpression.cs // Automatically generated contract file. +using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics.Contracts; using System.IO; using System.Text; -using System.Diagnostics.Contracts; -using System; // Disable the "this variable is not used" warning as every field would imply it. #pragma warning disable 0414 @@ -49,8 +50,11 @@ protected internal override Expression Accept (ExpressionVisitor visitor) return default(Expression); } + [Pure] public TryExpression Update (Expression body, IEnumerable handlers, Expression @finally, Expression fault) { + Contract.Requires(body != null); + Contract.Ensures(Contract.Result() != null); return default(TryExpression); } #endregion @@ -60,6 +64,7 @@ public Expression Body { get { + Contract.Ensures(Contract.Result() != null); return default(Expression); } } @@ -80,11 +85,12 @@ public Expression Finally } } - public System.Collections.ObjectModel.ReadOnlyCollection Handlers + public ReadOnlyCollection Handlers { get { - return default(System.Collections.ObjectModel.ReadOnlyCollection); + Contract.Ensures(Contract.Result>() != null); + return default(ReadOnlyCollection); } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.TypeBinaryExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.TypeBinaryExpression.cs index 91ed093c..4d05d2d9 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.TypeBinaryExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.TypeBinaryExpression.cs @@ -49,8 +49,31 @@ public Type TypeOperand get { Contract.Ensures(Contract.Result() != null); + Contract.Ensures(!Contract.Result().IsByRef); return default(Type); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // expression: + // The System.Linq.Expressions.TypeBinaryExpression.Expression property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public TypeBinaryExpression Update(Expression expression) + { + Contract.Requires(expression != null); + Contract.Ensures(Contract.Result() != null); + return default(TypeBinaryExpression); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.UnaryExpression.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.UnaryExpression.cs index 4a12b62a..4ddb7a0e 100644 --- a/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.UnaryExpression.cs +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Linq.Expressions.UnaryExpression.cs @@ -66,5 +66,27 @@ public Expression Operand return default(Expression); } } + +#if NETFRAMEWORK_4_0 || SILVERLIGHT_4_0 || SILVERLIGHT_5_0 + // + // Summary: + // Creates a new expression that is like this one, but using the supplied children. + // If all of the children are the same, it will return this expression. + // + // Parameters: + // operand: + // The System.Linq.Expressions.UnaryExpression.Operand property of the result. + // + // Returns: + // This expression if no children are changed or an expression with the updated + // children. + [Pure] + public UnaryExpression Update(Expression operand) + { + Contract.Requires(operand != null); + Contract.Ensures(Contract.Result() != null); + return default(UnaryExpression); + } +#endif } } diff --git a/Microsoft.Research/Contracts/System.Core.Contracts/System.Runtime.CompilerServices.DebugInfoGenerator.cs b/Microsoft.Research/Contracts/System.Core.Contracts/System.Runtime.CompilerServices.DebugInfoGenerator.cs new file mode 100644 index 00000000..d2a2dca8 --- /dev/null +++ b/Microsoft.Research/Contracts/System.Core.Contracts/System.Runtime.CompilerServices.DebugInfoGenerator.cs @@ -0,0 +1,108 @@ +// CodeContracts +// +// Copyright (c) Microsoft Corporation +// +// All rights reserved. +// +// MIT License +// +// 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 NETFRAMEWORK_4_0 +// File System.Runtime.CompilerServices.DebugInfoGenerator.cs +// Automatically generated contract file. +using System; +using System.Collections.Generic; +using System.Diagnostics.Contracts; +using System.Linq.Expressions; +using System.IO; +using System.Text; + +// Disable the "this variable is not used" warning as every field would imply it. +#pragma warning disable 0414 +// Disable the "this variable is never assigned to". +#pragma warning disable 0067 +// Disable the "this event is never assigned to". +#pragma warning disable 0649 +// Disable the "this variable is never used". +#pragma warning disable 0169 +// Disable the "new keyword not required" warning. +#pragma warning disable 0109 +// Disable the "extern without DllImport" warning. +#pragma warning disable 0626 +// Disable the "could hide other member" warning, can happen on certain properties. +#pragma warning disable 0108 + + +namespace System.Runtime.CompilerServices +{ + [ContractClass(typeof(ContractForDebugInfoGenerator))] + public abstract class DebugInfoGenerator + { + #region Methods and constructors + + // + // Summary: + // Initializes a new instance of the System.Runtime.CompilerServices.DebugInfoGenerator + // class. + protected DebugInfoGenerator() + { } + + // + // Summary: + // Creates a program database (PDB) symbol generator. + // + // Returns: + // A PDB symbol generator. + public static DebugInfoGenerator CreatePdbGenerator() + { + Contract.Ensures(Contract.Result() != null); + return default(DebugInfoGenerator); + } + + // + // Summary: + // Marks a sequence point in Microsoft intermediate language (MSIL) code. + // + // Parameters: + // method: + // The lambda expression that is generated. + // + // ilOffset: + // The offset within MSIL code at which to mark the sequence point. + // + // sequencePoint: + // Debug information that corresponds to the sequence point. + public abstract void MarkSequencePoint(LambdaExpression method, int ilOffset, DebugInfoExpression sequencePoint); + + #endregion + } + + [ContractClassFor(typeof(DebugInfoGenerator))] + abstract class ContractForDebugInfoGenerator : DebugInfoGenerator + { + // Summary: + // Marks a sequence point in Microsoft intermediate language (MSIL) code. + // + // Parameters: + // method: + // The lambda expression that is generated. + // + // ilOffset: + // The offset within MSIL code at which to mark the sequence point. + // + // sequencePoint: + // Debug information that corresponds to the sequence point. + public override void MarkSequencePoint(LambdaExpression method, int ilOffset, DebugInfoExpression sequencePoint) + { + Contract.Requires(method != null); + Contract.Requires(sequencePoint != null); + } + } + +} +#endif \ No newline at end of file