我想用公共构造函数实例化第三方的内部类,确切地说是类Microsoft.AnalysisServices.XmlaClient。理想情况下,我希望最终能够访问像instance.Connect(blabla)等方法。这可以通过Reflection吗?
namespace Microsoft.AnalysisServices
{
internal class XmlaClient
{
public XmlaClient();
public ConnectionInfo ConnectionInfo { get; }
public string SessionID { get; set; }
public void CancelCommand(string sessionID);
public void Connect(string connectionString);
public void Connect(ConnectionInfo connectionInfo);
public void Connect(ConnectionInfo connectionInfo, bool beginSession);
public void Connect(ConnectionInfo connectionInfo, string sessionID);
public void Connect(string connectionString, bool beginSession);
public void Connect(string connectionString, string sessionID);
public void Disconnect();
public void Disconnect(bool endSession);
public ConnectionState GetConnectionState(bool pingServer);
public void Reconnect();
}
}