Microsoft.DiaSymReader.SymUnmanagedExtensions.GetMethodByVersion C# (CSharp) Method

GetMethodByVersion() public static method

public static GetMethodByVersion ( this reader, int methodToken, int methodVersion ) : ISymUnmanagedMethod
reader this
methodToken int
methodVersion int
return ISymUnmanagedMethod
        public static ISymUnmanagedMethod GetMethodByVersion(this ISymUnmanagedReader reader, int methodToken, int methodVersion)
        {
            if (reader == null)
            {
                throw new ArgumentNullException(nameof(reader));
            }

            ISymUnmanagedMethod method = null;
            int hr = reader.GetMethodByVersion(methodToken, methodVersion, out method);
            ThrowExceptionForHR(hr);

            if (hr < 0)
            {
                // method has no symbol info
                return null;
            }

            if (method == null)
            {
                throw new InvalidOperationException();
            }

            return method;
        }
    }