public T Deserialize <T>(Stream requestStream) { var type = typeof(T); if (type == typeof(SpecialCustomerPoco)) { object poco = new SpecialCustomerPoco(Common.GetString(requestStream)); return((T)poco); } throw new InvalidCastException(); }
public void Serialize <T>(T response, Stream responseStream) { string data; object obj = response; if (response is SpecialCustomerPoco) { SpecialCustomerPoco poco = (SpecialCustomerPoco)obj; data = poco.Data; } else { throw new InvalidCastException(); } responseStream.Write(Encoding.ASCII.GetBytes(data), 0, data.Length); }
public SpecialCustomerPoco NoInterfaceCustomerTypeSerializerMethod(SpecialCustomerPoco input) { Common.LogCommonData("NoZeroParameterConstructorCustomerTypeSerializerMethod", input.Data); return(new SpecialCustomerPoco("(([NoZeroParameterConstructorCustomerTypeSerializerMethod]))")); }
public SpecialCustomerPoco ExceptionInConstructorCustomerTypeSerializerMethod(SpecialCustomerPoco input) { Common.LogCommonData("ExceptionInConstructorCustomerTypeSerializerMethod", input.Data); return(new SpecialCustomerPoco("(([ExceptionInConstructorCustomerTypeSerializerMethod]))")); }
public SpecialCustomerPoco CustomSerializerMethod(SpecialCustomerPoco input) { Common.LogCommonData("CustomSerializerMethod", input.Data); return(new SpecialCustomerPoco("(([CustomSerializerMethod]))")); }