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