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;
        }
示例#2
0
        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);
        }
示例#3
0
 /// <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));
 }