static object Deserialize(MessageType messageType, byte[] data) { try { var contractType = ContractUtility.GetContractType(messageType); return(Deserialize(contractType, data)); } catch { throw new Exception("InvalidProtocolBufferException"); } }
public void SupportAllMessageTypes() { bool allSupported = true; foreach (var messageType in ((MessageType[])Enum.GetValues(typeof(MessageType)))) { try { ContractUtility.GetContractType(messageType); } catch (Exception ex) { Log.Error(ex.ToString()); allSupported = false; } Assert.True(allSupported, "Not all message types supported."); } }