public void Connect(IDictionary <string, string> properties) { using (new LogMethodExecution(ConnectorTypeDescription, methodInfo.GetCurrentMethodName())) { try { // validate & get connection properties var connectionProps = ScriptRunnerConnectionHelper.GetConnectionProperties(properties); service = new ScriptRunnerService(); service.Connect(connectionProps); metadataProvider = new ScriptRunnerMetadataProvider(service); } catch (InvalidConnectionException) { clearLocals(); throw; } catch (Exception exception) { clearLocals(); unhandledExecptionHandler(methodInfo.GetCurrentMethodName(), exception); } } }
public string PreConnect(IDictionary <string, string> properties) { using (new LogMethodExecution(ConnectorTypeDescription, methodInfo.GetCurrentMethodName())) { try { var uiDef = ScriptRunnerConnectionHelper.GetConnectionFormDefintion(); return(uiDef.Serialize()); } catch (Exception exception) { unhandledExecptionHandler(methodInfo.GetCurrentMethodName(), exception); } } return(""); }