/// <summary> /// Creates and SDK connection using the specified connection configuration /// </summary> /// <param name="config">The connection configuration to use</param> /// <returns>a usable connection or null if an error occurred</returns> public static SDKConnection GetConnection(ConnectionConfig config) { if (_thisApplication == null) { throw new Exception("Application ID is not set"); } try { var cn = new SDKConnection(_thisApplication, config); if (config.ConnectionType != FCConnectionType.Online) { cn.QueryDesktopVersion(); } lock (_connections) { _connections.Add(cn); } return(cn); } catch (SDKException sdkex) { var entry = new StatusEntry() { TypeOfEntry = StatusEntry.EntryType.Error, Summary = sdkex.Message, Details = sdkex.ProblemDetail }; StatusMgr.LogEntry(entry); return(null); } }
/// <summary> /// Creates and SDK connection using the specified connection configuration /// </summary> /// <param name="config">The connection configuration to use</param> /// <returns>a usable connection or null if an error occurred</returns> public static SDKConnection GetConnection(ConnectionConfig config) { if (_thisApplication == null) { throw new Exception("Application ID is not set"); } try { var cn = new SDKConnection(_thisApplication, config); if (config.ConnectionType != FCConnectionType.Online) { cn.QueryDesktopVersion(); } lock (_connections) { _connections.Add(cn); } return cn; } catch (SDKException sdkex) { var entry = new StatusEntry() { TypeOfEntry = StatusEntry.EntryType.Error, Summary = sdkex.Message, Details = sdkex.ProblemDetail }; StatusMgr.LogEntry(entry); return null; } }