示例#1
0
        public Collection <ParameterDefinition> GetParameters(MethodRow methodRow, MethodSignatureReader signature, MethodDefinition methodDef)
        {
            var start      = methodRow.ParamList;
            var count      = signature.ParamCount;
            var parameters = new ParameterDefinition[count];

            for (uint offset = 0; offset < count; offset++)
            {
                var paramRid  = start + offset;
                var paramRow  = _reader.ParameterTable[paramRid];
                var paramType = signature.ParamTypes[paramRow.Sequence - 1];
                parameters[offset] = ParameterDefinitionResolver.Resolve(paramRid, paramRow, this, methodDef, paramType);
            }

            return(new Collection <ParameterDefinition>(parameters));
        }
示例#2
0
            public static ParameterDefinition Resolve(ParameterDefinition param)
            {
                var resolver = new ParameterDefinitionResolver(param);

                return(new ParameterDefinition(resolver));
            }
示例#3
0
 public Collection <ParameterDefinition> GetParameters(MethodReference method)
 {
     return(_methodDef.Parameters
            .Select(param => ParameterDefinitionResolver.Resolve(param))
            .ToCollection(_methodDef.Parameters.Count));
 }