/// <summary>
        /// 各種サービスを初期化します
        /// </summary>
        /// <param name="ghostScriptPath"></param>
        /// <param name="zbarImagePath"></param>
        /// <param name="bookinfoGetService"></param>
        public void InitService(string ghostScriptPath, string zbarImagePath, IBookInfoGet bookinfoGetService)
        {
            //GostScriptによる画像変換
            var pdfconv = new GostScriptPDFtoJPG();

            pdfconv.GsExePath = ghostScriptPath;
            //zbarによる画像読み込み
            var isbnimage = new IsbnGetFromZBarImage();

            isbnimage.ZBarExePath = zbarImagePath;

            //PDF解凍
            _pdfIsbnGet = new ExtractAndIsbnGetLogic(pdfconv, isbnimage, bookinfoGetService);

            //ZIP解凍
            var zipExtract = new ZiptoJPG();

            _zipIsbnGet = new ExtractAndIsbnGetLogic(zipExtract, isbnimage, bookinfoGetService);

            //RAR解凍
            var rarExtract = new RarToJPG();

            _rarIsbnGet = new ExtractAndIsbnGetLogic(rarExtract, isbnimage, bookinfoGetService);
        }
예제 #2
0
 public ExtractAndIsbnGetLogic(IExtractJPG extractImageService, IIsbnGetFromJpeg isbnGetService, IBookInfoGet bookInfoGetService)
 {
     _extractImageService = extractImageService;
     _isbnGetService      = isbnGetService;
     _bookInfoGetService  = bookInfoGetService;
 }