public static bool TryCreate(ReportServerInfo reportServer, out IWsWrapper result, out Exception exception) { RS.ReportingService proxy = new RS.ReportingService { Url = reportServer.GetServiceUrl(SERVICE_NAME), Timeout = reportServer.Timeout ?? -1, Credentials = reportServer.CreateCredentials(SERVICE_NAME) }; try { proxy.ListSecureMethods(); result = new WsWrapper2003(proxy); exception = null; return(true); } catch (Exception e) { proxy.Dispose(); result = null; exception = e; return(false); } }
public void Dispose() { _proxy.Dispose(); }