在哪里/如何查看ODP.NET源代码?

我有一个正在测试的程序,我想查看“内幕”代码,特别是OpenWithNewPassword方法(可能必须在页面上按Ctrl + F)。 Oracle提供了类似于microsoft提供的Reference Source的东西吗?我唯一能找到的是方法的定义及其作用。

using System;
using Oracle.Dataaccess.Client; 
 
class PasswordExpirationSample
{
  static void Main()
  {
    OracleConnection con = new OracleConnection();
 
    try
    {
      con.ConnectionString = 
        "User Id=testexpire;Password=testexpire;Data Source=oracle";
      con.Open();
      Console.WriteLine("Connected to Oracle" + con.ServerVersion);
    }
    catch (OracleException ex)
    {
      Console.WriteLine(ex.Message);
 
      //check the error number 
      //ORA-28001 : the password has expired
      if (ex.Number == 28001)
      {
        Console.WriteLine("\nChanging password to panther");
        con.OpenWithNewPassword("panther");  // What call is this making with the database?
        Console.WriteLine("Connected with new password.");
      }
    }
    finally
    {
      // Close and Dispose OracleConnection object
      con.Close();
      con.Dispose();
      Console.WriteLine("Disconnected");
    }
  }
}
iCMS 回答:在哪里/如何查看ODP.NET源代码?

由于评论中提到的原因,我只能猜测

con.OpenWithNewPassword("panther");  // What call is this making with the database?

它可能会使用现有连接及其所有已解析的连接字符串以及任何内部状态等,并仅更改密码,然后尝试再次打开连接。连接字符串包含很多东西(用户,密码,主机等),这些东西将在连接对象的整个生命周期内在内部进行解析和使用。可能有一个有效的用例,就是不要再次执行所有操作,而只是更改密码,然后再次连接到数据库。 (我个人想不到,除非交易能够在连接循环中继续存在;我只是用新密码进行新连接)

至少,在不违反许可协议的情况下,您可以使用调试器本地窗口查看其内部变量的连接以存储密码(在非公共成员节点下,因为OracleConnection不会似乎有一个公共密码属性,就像处理其他内容一样),获取其哈希码或屏幕截图值等,然后调用OpenWithNewPassword并查看密码是否更改,但其他所有内容都与打开连接之前相同。合理说明其作用

本文链接:https://www.f2er.com/1807416.html

大家都在问