示例#1
0
        public async Task ValidateAsync(ProgressAndStatus progressAndStatus)
        {
            //progressAndStatus.UserName = "******";
            //progressAndStatus.Password = "******";
            progressAndStatus.Method = 1;

            var dummy = Setup(progressAndStatus);

            await dummy.ValidateFileAsync(
                inputFilePath : progressAndStatus.PhysicalDataFile,       // original uploaded file
                outputFilePath : progressAndStatus.ValidationReportFile,  // original plus validation report
                callback : UpdaterCallback);
        }
示例#2
0
        public void Process(ProgressAndStatus progressAndStatus)
        {
            progressAndStatus.Method = 2;

            var dummy = Setup(progressAndStatus);

            //progressAndStatus.Callback = UpdaterCallback;
            progressAndStatus.UploadReportFile  = GetReportFileName(progressAndStatus.PhysicalDataFile);
            progressAndStatus.ValidationSuccess = progressAndStatus.SuccessProgress == Progress.prSuccess;

            dummy.UploadFile(
                inputFilePath:  progressAndStatus.ValidationReportFile,
                outputFilePath: progressAndStatus.UploadReportFile,  //  original plus validation report + upload (process) report
                callback: UpdaterCallback);
        }
示例#3
0
        //public void UploadSettingsFile(UploadData uploadData)
        //{

        //    //var rioMock = new RioMock();
        //    //rioMock.DoRioProcess(UpdaterCallback);

        //}

        //public void UploadTemplateFile(UploadData uploadData)
        //{
        //    //// call client-side SendMethod method
        //    //Clients.Caller.sendMessage(message);
        //}


        private Dummy Setup(ProgressAndStatus progressAndStatus)
        {
            //progressAndStatus.UserName = progressAndStatus.UserName; //  "iona.setup";
            //progressAndStatus.Password = progressAndStatus.Password; //  "Password";

            var basePath     = AppDomain.CurrentDomain.BaseDirectory; // HttpContext.Server.MapPath("~");
            var settingsPath = basePath + "settings.xml";

            SettingsDto settingsDto = ObjectFactory.GenerateSettingsDto(settingsXmlFilePath: settingsPath);

            Dummy dummy = new Dummy(settingsDto, progressAndStatus);

            dummy.SetEnvironment(progressAndStatus.Environment);

            //TODO: Need to figure out login criteria
            dummy.SetUsernameAndPassword(progressAndStatus.UserName, progressAndStatus.Password);
            return(dummy);
        }
示例#4
0
 public void UpdaterCallback(ProgressAndStatus progressAndStatus)
 {
     // call client-side SendMethod method
     Clients.Caller.sendMessage(progressAndStatus);
 }