예제 #1
0
 private static DataContractSerializer CreateSerializer(Type target)
 {
     return(new DataContractSerializer(target, WorkflowBuilder.GetKnownTypes(), 2147483646, false, true, null));
 }
예제 #2
0
 public static object Deserialize(Type target, string input)
 {
     using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(input)))
         return(WorkflowBuilder.CreateSerializer(target).ReadObject(stream));
 }