private static void UnmarshallResult(JsonUnmarshallerContext context,CreatePresetResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("Preset", targetDepth))
{
context.Read();
response.Preset = PresetUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("Warning", targetDepth))
{
context.Read();
response.Warning = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}