PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms 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
 1// <copyright>
 2//   Copyright (c) Microsoft Corporation.  All rights reserved.
 3// </copyright>
 4
 5namespace System.ServiceModel.Description
 6{
 7    using System;
 8    using Reflection;
 9
10    internal class TypeLoader
11    {
12        public static Type GetParameterType(ParameterInfo parameterInfo)
13        {
14            Type parameterType = parameterInfo.ParameterType;
15            if (parameterType.IsByRef)
16            {
17                return parameterType.GetElementType();
18            }
19            else
20            {
21                return parameterType;
22            }
23        }
24    }
25}