2009-07-11 Michael Barker <mike@middlesoft.co.uk>
[mono.git] / mcs / class / dlr / Runtime / Microsoft.Dynamic / Helpers.cs
1
2 /* ****************************************************************************
3  *
4  * Copyright (c) Microsoft Corporation. 
5  *
6  * This source code is subject to terms and conditions of the Microsoft Public License. A 
7  * copy of the license can be found in the License.html file at the root of this distribution. If 
8  * you cannot locate the  Microsoft Public License, please send an email to 
9  * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
10  * by the terms of the Microsoft Public License.
11  *
12  * You must not remove this notice, or any other, from this software.
13  *
14  *
15  * ***************************************************************************/
16 using System; using Microsoft;
17
18
19 #if CODEPLEX_40
20 using System.Linq.Expressions;
21 #else
22 using Microsoft.Linq.Expressions;
23 #endif
24
25 #if CODEPLEX_40
26 namespace System.Dynamic {
27 #else
28 namespace Microsoft.Scripting {
29 #endif
30
31     // Miscellaneous helpers that don't belong anywhere else
32     internal static class Helpers {
33
34         internal static Expression Convert(Expression expression, Type type) {
35             if (expression.Type == type) {
36                 return expression;
37             }
38             return Expression.Convert(expression, type);
39         }
40     }
41 }