PageRenderTime 42ms CodeModel.GetById 18ms 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
Possible License(s): GPL-2.0, MPL-2.0-no-copyleft-exception, CPL-1.0, CC-BY-SA-3.0, BSD-3-Clause, ISC, AGPL-3.0, LGPL-2.1, Apache-2.0
  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. * ***************************************************************************/
  15. using System; using Microsoft;
  16. #if !SILVERLIGHT
  17. using System.Diagnostics;
  18. using Microsoft.Linq.Expressions;
  19. namespace Microsoft.Scripting.Com {
  20. internal sealed class ReturnBuilder {
  21. private readonly Type _returnType;
  22. /// <summary>
  23. /// Creates a ReturnBuilder
  24. /// </summary>
  25. /// <param name="returnType">the type the ReturnBuilder will leave on the stack</param>
  26. internal ReturnBuilder(Type returnType) {
  27. Debug.Assert(returnType != null);
  28. _returnType = returnType;
  29. }
  30. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
  31. internal Expression ToExpression(Expression ret) {
  32. return ret;
  33. }
  34. internal Type ReturnType {
  35. get {
  36. return _returnType;
  37. }
  38. }
  39. }
  40. }
  41. #endif