PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/src/LinFu.Reflection.Emit/ParameterDefinitionExtensions.cs

http://github.com/philiplaureano/LinFu
C# | 21 lines | 11 code | 1 blank | 9 comment | 2 complexity | a268ca0a5201abc1180cb33747ff1df5 MD5 | raw file
 1using Mono.Cecil;
 2
 3namespace LinFu.Reflection.Emit
 4{
 5    /// <summary>
 6    ///     A class that extends the <see cref="ParameterDefinition" /> class
 7    ///     to emulate features found in the System.Reflection.Emit namespace.
 8    /// </summary>
 9    public static class ParameterDefinitionExtensions
10    {
11        /// <summary>
12        ///     Determines whether or not a parameter is passed by reference.
13        /// </summary>
14        /// <param name="parameter"></param>
15        /// <returns></returns>
16        public static bool IsByRef(this ParameterDefinition parameter)
17        {
18            return parameter.ParameterType != null && parameter.ParameterType.IsByReference;
19        }
20    }
21}