public T Deserialize <T>(Stream requestStream)
        {
            var type = typeof(T);

            if (type == typeof(CustomerPoco))
            {
                object poco = new CustomerPoco(Common.GetString(requestStream));
                return((T)poco);
            }
            if (type == typeof(CustomerPocoIn))
            {
                object poco = new CustomerPocoIn(Common.GetString(requestStream));
                return((T)poco);
            }
            if (type == typeof(CustomerPocoOut))
            {
                object poco = new CustomerPocoOut(Common.GetString(requestStream));
                return((T)poco);
            }

            throw new InvalidCastException();
        }
예제 #2
0
 public void ContextAndPocoInZeroOut(CustomerPoco poco, ILambdaContext context)
 {
     Common.LogCommonData("ContextAndPocoInZeroOut", poco.Data, context);
 }
예제 #3
0
 public void PocoInZeroOut(CustomerPoco data)
 {
     Common.LogCommonData("PocoInZeroOut", data.Data);
 }
예제 #4
0
 public CustomerPoco PocoInPocoOut(CustomerPoco data)
 {
     Common.LogCommonData("PocoInPocoOut", data.Data);
     return(new CustomerPoco("(([PocoInPocoOut]))"));
 }
예제 #5
0
 public CustomerPoco ContextAndPocoInPocoOut(CustomerPoco data, ILambdaContext context)
 {
     Common.LogCommonData("ContextAndPocoInPocoOut", data.Data, context);
     return(new CustomerPoco("(([ContextAndPocoInPocoOut]))"));
 }