public void Connect(string connectionString) { if (_type == AmoType.AnalysisServices) { _svr.Connect(connectionString); } else { AmoServer.VoidDelegate f = delegate { _xlSvr.Connect(connectionString); }; f(); } }
public AmoServer(AmoType amoType) { _type = amoType; if (amoType == AmoType.AnalysisServices) { Log.Debug("{class} {method} {message}", "AmoServer", "<constructor>", "Using Microsoft.AnalysisServices"); _svr = new Microsoft.AnalysisServices.Server(); } else { Log.Debug("{class} {method} {message}", "AmoServer", "<constructor>", "Using Microsoft.Excel.Amo"); AmoServer.VoidDelegate f = delegate { _xlSvr = new ExcelAmo.Microsoft.AnalysisServices.Server(); }; f(); } }