public IConnection GetConnection(ConnectionKindsEnum connectionKind, ConnectionTypesEnum connectionType) { IConnection result = null; if (connectionKind == ConnectionKindsEnum.KodiMediaPlayer && connectionType == ConnectionTypesEnum.JsonRpcHttp) { result = new KodiJsonRpcHttpConnection(); } if (connectionKind == ConnectionKindsEnum.Enigma2WebInterface || (connectionKind == ConnectionKindsEnum.Enigma2WebInterface && connectionType == ConnectionTypesEnum.Http)) { result = new Enigma2WebIfHttpConnection(); } return result; }
public IConnection GetConnection(ConnectionKindsEnum connectionKind, ConnectionTypesEnum connectionType) { IConnection result = null; if (connectionKind == ConnectionKindsEnum.KodiMediaPlayer && connectionType == ConnectionTypesEnum.JsonRpcHttp) { result = new KodiJsonRpcHttpConnection(); } if (connectionKind == ConnectionKindsEnum.Enigma2WebInterface || (connectionKind == ConnectionKindsEnum.Enigma2WebInterface && connectionType == ConnectionTypesEnum.Http)) { result = new Enigma2WebIfHttpConnection(); } return(result); }
/// <summary> /// Create connection /// </summary> /// <param name="connectionKind"></param> /// <param name="connectionType"></param> /// <returns></returns> public IConnection CreateConnection(ConnectionKindsEnum connectionKind, ConnectionTypesEnum connectionType) { return(this.connectionFactory.GetConnection(connectionKind, connectionType)); }