コード例 #1
0
        public ActionResult <string> ProcessInBackground(List <IFormFile> files)
        {
            if (files.Count != 2)
            {
                return(BadRequest());
            }

            var left  = Image.FromStream(files[0].OpenReadStream()) as Bitmap;
            var right = Image.FromStream(files[1].OpenReadStream()) as Bitmap;

            return(_imageComparerManager.ProcessInBackground(left, right, 20).ToString());
        }
コード例 #2
0
 public void ProcessInBackground_LeftIsNull_ThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() => _comparerManager.ProcessInBackground(null, _image, Threshold));
 }