public int defineStringDecrypter(int methodToken) { checkStringDecrypter(); var methodInfo = findMethod(methodToken); if (methodInfo == null) { throw new ApplicationException(string.Format("Could not find method {0:X8}", methodToken)); } if (methodInfo.ReturnType != typeof(string) && methodInfo.ReturnType != typeof(object)) { throw new ApplicationException(string.Format("Method return type must be string or object: {0}", methodInfo)); } return(stringDecrypter.defineStringDecrypter(methodInfo)); }