PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/IronPython_2_0/Src/Microsoft.Scripting.Core/Com/ReturnBuilder.cs

#
C# | 51 lines | 23 code | 10 blank | 18 comment | 1 complexity | 9eda3e319a2f243e47a906735d4d9a5a MD5 | raw file
 1/* ****************************************************************************
 2 *
 3 * Copyright (c) Microsoft Corporation. 
 4 *
 5 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 6 * copy of the license can be found in the License.html file at the root of this distribution. If 
 7 * you cannot locate the  Microsoft Public License, please send an email to 
 8 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 9 * by the terms of the Microsoft Public License.
10 *
11 * You must not remove this notice, or any other, from this software.
12 *
13 *
14 * ***************************************************************************/
15using System; using Microsoft;
16
17
18#if !SILVERLIGHT
19
20using System.Diagnostics;
21using Microsoft.Linq.Expressions;
22
23namespace Microsoft.Scripting.Com {
24
25    internal sealed class ReturnBuilder {
26        private readonly Type _returnType;
27
28        /// <summary>
29        /// Creates a ReturnBuilder
30        /// </summary>
31        /// <param name="returnType">the type the ReturnBuilder will leave on the stack</param>
32        internal ReturnBuilder(Type returnType) {
33            Debug.Assert(returnType != null);
34
35            _returnType = returnType;
36        }
37
38        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
39        internal Expression ToExpression(Expression ret) {
40            return ret;
41        }
42
43        internal Type ReturnType {
44            get {
45                return _returnType;
46            }
47        }
48    }
49}
50
51#endif