private void DoAPIClean() { Stopwatch watch = new Stopwatch(); watch.Start(); ActionDataImpl testData = new ActionDataImpl(m_sFileForApiCleanIn); CleanUserAction cleaner = new CleanUserAction(); ActionPropertySet cleanProperties = new ActionPropertySet(new CleanActionPropertySet()); cleanProperties.SystemProperties.Add("FileType", new ActProp() { Value = ".doc" }); testData.Properties.Add("DisplayName", Guid.NewGuid().ToString() + m_sFileExtension); m_sFileForApiClean = cleaner.Execute(testData, cleanProperties); watch.Stop(); m_apiCleanTime = watch.Elapsed.TotalSeconds; }
private void DoLightSpeedCleanEx(List<ContentType> listContentTypes) { System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch(); watch.Start(); ActionDataImpl testData = new ActionDataImpl(m_sInputFile); testData.Properties.Add("DisplayName", m_sInputFile); testData.Properties.Add("FileName", m_sInputFile); IAction3 cleaner = LoadCleaner(); ActionPropertySet cleanProperties = new ActionPropertySet(cleaner.PropertySet); //ensure no fallback occurs as that would miss the point of lightspeed cleanProperties.SystemProperties.Add("RunAt", new ActionProperty("RunAt", "Server")); m_sFileForBinClean = cleaner.Execute(testData, cleanProperties); watch.Stop(); m_binCleanTime = watch.Elapsed.TotalSeconds; }
public void DoAPIClean() { CleanUserAction cleaner = new CleanUserAction(); ActionPropertySet cleanProperties = new ActionPropertySet(new CleanActionPropertySet()); ActionDataImpl testData = new ActionDataImpl(m_filenameIn); testData.Properties.Add("DisplayName", "BlahBlahBlah" + m_sFileExtension); cleanProperties["Footnotes"].Value = false; m_filenameOut = cleaner.Execute(testData, cleanProperties); }