public void SaveConfiguration(AdditionConfiguration newConfig) { MediationServiceConfiguration ms = FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.GetNotCashedConfiguration <MediationServiceConfiguration>(); MedOutputFilesConfiguration mo = FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.GetNotCashedConfiguration <MedOutputFilesConfiguration>(); var tarifDir = mo.TarificationFile; var errorDir = mo.ErrorFile; var rejDir = mo.RejectedFile; ms.StartupTimeout = int.Parse(newConfig.StartupTimeout); ms.StartTransfer = int.Parse(newConfig.StartTransfer); ms.FileCreatedTimeout = int.Parse(newConfig.FileCreatedTimeout); ms.NumberOfThreads = int.Parse(newConfig.NumberOfThreads); ms.ProcessedDirectory = newConfig.ProcessedDirectory; ms.TarificationDirectory = newConfig.TarificationDirectory; tarifDir.Directory = newConfig.TariffDirectory; tarifDir.Extension = newConfig.TariffExtension; rejDir.Directory = newConfig.RejDirectory; rejDir.Extension = newConfig.RejExtension; errorDir.Directory = newConfig.ErrDirectory; errorDir.Extension = newConfig.ErrExtension; FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.SaveConfiguration(mo.GetType(), mo); FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.SaveConfiguration(ms.GetType(), ms); string logString = "MediationOutputConfiguration and MediationServiceConfiguration has been changed"; WriteLog("INSERT", "MED Configuration", "MedOutputConfiguration", System.Security.Principal.WindowsIdentity.GetCurrent().Name, logString, ""); }
public AdditionConfiguration GetAdditionalConfiguration() { MediationServiceConfiguration ms = FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.GetNotCashedConfiguration <MediationServiceConfiguration>(); MedOutputFilesConfiguration mo = FORIS.Interbilling.NTS.Mediation.Configurations.Configuration.GetNotCashedConfiguration <MedOutputFilesConfiguration>(); var tarifDir = mo.TarificationFile; var errorDir = mo.ErrorFile; var rejDir = mo.RejectedFile; AdditionConfiguration obj = new AdditionConfiguration() { StartupTimeout = ms.StartupTimeout.ToString(), StartTransfer = ms.StartTransfer.ToString(), FileCreatedTimeout = ms.FileCreatedTimeout.ToString(), NumberOfThreads = ms.NumberOfThreads.ToString(), ProcessedDirectory = ms.ProcessedDirectory.ToString(), TarificationDirectory = ms.TarificationDirectory.ToString(), TariffDirectory = tarifDir.Directory.ToString(), TariffExtension = tarifDir.Extension.ToString(), RejDirectory = rejDir.Directory.ToString(), RejExtension = rejDir.Extension.ToString(), ErrDirectory = errorDir.Directory.ToString(), ErrExtension = errorDir.Extension.ToString() }; return(obj); }