public VTLDevice Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } VTLDevice vTLDevice = new VTLDevice(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("VTLDeviceARN", targetDepth)) { context.Read(); vTLDevice.VTLDeviceARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VTLDeviceType", targetDepth)) { context.Read(); vTLDevice.VTLDeviceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VTLDeviceVendor", targetDepth)) { context.Read(); vTLDevice.VTLDeviceVendor = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VTLDeviceProductIdentifier", targetDepth)) { context.Read(); vTLDevice.VTLDeviceProductIdentifier = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DeviceiSCSIAttributes", targetDepth)) { context.Read(); vTLDevice.DeviceiSCSIAttributes = DeviceiSCSIAttributesUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(vTLDevice); } } return(vTLDevice); }
public static DeviceiSCSIAttributesUnmarshaller GetInstance() { if (instance == null) { instance = new DeviceiSCSIAttributesUnmarshaller(); } return(instance); }