PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/WCFWebApi/prototype/Microsoft.ApplicationServer.HttpEnhancements/System/ServiceModel/Description/TypeLoader.cs

#
C# | 25 lines | 20 code | 2 blank | 3 comment | 1 complexity | 0c897605aee6bb141d406f3e1438171c MD5 | raw file
Possible License(s): CC-BY-SA-3.0, Apache-2.0
  1. // <copyright>
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. // </copyright>
  4. namespace System.ServiceModel.Description
  5. {
  6. using System;
  7. using Reflection;
  8. internal class TypeLoader
  9. {
  10. public static Type GetParameterType(ParameterInfo parameterInfo)
  11. {
  12. Type parameterType = parameterInfo.ParameterType;
  13. if (parameterType.IsByRef)
  14. {
  15. return parameterType.GetElementType();
  16. }
  17. else
  18. {
  19. return parameterType;
  20. }
  21. }
  22. }
  23. }