public Profile() { _name = string.Empty; _username = "******"; _password = "******"; _address = "192.168.1.1"; _enigma = EnigmaType.Enigma2; _httpPort = 80; }
public async Task <IResponse <TCommand> > ParseAsync(string response, EnigmaType enigmaType) { try { return(await Task.Run(() => new UnparsedResponse <TCommand>(response))); } catch (Exception ex) { if (ex is KnownException || ex is OperationCanceledException) { throw; } throw new ParsingException(string.Format("Failed to parse response{0}{1}", Environment.NewLine, response), ex); } }
private IBouquetItem InitializeItem(string reference, EnigmaType enigmaType) { if (String.IsNullOrEmpty(reference)) { return(null); } if (reference.StartsWith("1:0:1")) { return(enigmaType == EnigmaType.Enigma2 ? _factory.BouquetItemService() : _factory.BouquetItemServiceE1()); } if (reference.StartsWith("1:64")) { return(_factory.BouquetItemMarker()); } return(_factory.BouquetItemBouquet()); }
public async Task <IVolumeStatusResponse> ParseAsync(string response, EnigmaType enigmaType) { try { if (enigmaType == EnigmaType.Enigma1) { return(await Task.Run(() => ParseE1(response))); } return(await Task.Run(() => ParseE2(response))); } catch (Exception ex) { if (ex is KnownException || ex is OperationCanceledException) { throw; } throw new ParsingException(string.Format("Failed to parse response{0}{1}", Environment.NewLine, response), ex); } }