Microsoft.Cci.CodeModelToILConverter.GetParameterIndex C# (CSharp) Method

GetParameterIndex() private static method

Translates the parameter list position of the given parameter to an IL parameter index. In other words, it adds 1 to the parameterDefinition.Index value if the containing method has an implicit this parameter.
private static GetParameterIndex ( IParameterDefinition parameterDefinition ) : ushort
parameterDefinition IParameterDefinition
return ushort
    private static ushort GetParameterIndex(IParameterDefinition parameterDefinition) {
      ushort parameterIndex = parameterDefinition.Index;
      if (!parameterDefinition.ContainingSignature.IsStatic) parameterIndex++;
      return parameterIndex;
    }