AsmResolver.Net.Metadata.ReferenceImporter.ImportMethodSignature C# (CSharp) Method

ImportMethodSignature() public method

public ImportMethodSignature ( MethodSignature signature ) : MethodSignature
signature AsmResolver.Net.Signatures.MethodSignature
return AsmResolver.Net.Signatures.MethodSignature
        public MethodSignature ImportMethodSignature(MethodSignature signature)
        {
            var newSignature = new MethodSignature(ImportTypeSignature(signature.ReturnType))
            {
                Attributes = signature.Attributes,
                GenericParameterCount = signature.GenericParameterCount,
            };

            foreach (var parameter in signature.Parameters)
                newSignature.Parameters.Add(new ParameterSignature(ImportTypeSignature(parameter.ParameterType)));

            return newSignature;
        }