public static SizeSupported query(VideoDevice device, ePixelFormat pixelFormat) { sFrameSizeEnum fse = device.frameSizeFirst(pixelFormat); switch (fse.type) { case eFrameSizeType.Discrete: break; case eFrameSizeType.Continuous: case eFrameSizeType.Stepwise: return(new ContinuousSizes(ref fse)); default: throw new ApplicationException(); } return(new DiscreteSizes(device.frameSizeEnum(pixelFormat))); }