Пример #1
0
        /// <summary>
        /// Constructor which creates the json configuration for the import and also a request service for the grabing the remote html
        /// </summary>
        /// <param name="options"></param>
        /// <param name="helper"></param>
        /// <param name="content"></param>
        /// <param name="request"></param>
        public ImporterService(MigrationOptions options, IMigrationHelper helper, IMigrationContentService content, IRequestService request)
        {
            Options = options.NotNull();

            _helper = helper.NotNull();
            _content = content.NotNull();
            _request = request.NotNull();
        }
Пример #2
0
        // CONFIGURE 

        /// <summary>
        /// Setup the options for the crawl from our Angulat views post
        /// </summary>
        /// <param name="options"></param>
        /// <returns></returns>
        public object Setup(MigrationOptions options)
        {
            //TODO: ML - Actually build a front end for this

            options.Key = Guid.NewGuid().ToString();

            _common.SerialiseToDisk(options, options.Key, Files.Options);

            return Json(new { key = options.Key });
        }