public FilingProcessor(UpdateStatusExecutor executor) { // plamen this.executor = executor; string tmp = this.ReportsFolder; tmp = this.ReportFormat.ToString(); tmp = this.HtmlReportFormat.ToString(); tmp = this.CurrencyMappingFile; tmp = this.RemoteFileCachePolicy.ToString(); }
public Filing(UpdateStatusExecutor executor, string instancePath) { if (!Path.IsPathRooted(instancePath)) { string tmp = Path.Combine(FilingProcessor.cd, instancePath); executor.Invoke("Information: Instance document has a relative path " + instancePath + "."); executor.Invoke("\tAdjusting path to current locatin " + tmp + ""); instancePath = tmp; } this.InstancePath = instancePath; }
public Filing(UpdateStatusExecutor executor, string instancePath ) { if( !Path.IsPathRooted( instancePath ) ) { string tmp = Path.Combine( FilingProcessor.cd, instancePath ); executor.Invoke("Information: Instance document has a relative path " + instancePath + "."); executor.Invoke("\tAdjusting path to current locatin " + tmp + ""); instancePath = tmp; } this.InstancePath = instancePath; }
private static bool UnzipPackage(UpdateStatusExecutor executor, Filing f, string zipPath, out string[] zipFiles) { zipFiles = new string[0]; string errorMsg; if (!ZipUtilities.TryUnzipAndUncompressFiles(f.InstancePath, zipPath, out zipFiles, out errorMsg)) { executor.Invoke("Error: The ZIP file cannot be opened."); executor.Invoke("\tSkipping filing: " + f.InstancePath); return(false); } return(true); }
// ctor public RendererStarter(UpdateStatusExecutor executor) { this.executor = executor; }
public static FilingProcessor Load(UpdateStatusExecutor executor, params string[] args) { FilingProcessor fp = new FilingProcessor(executor); //return fp; foreach (string arg in args) { if (!arg.StartsWith("/")) { executor.Invoke("Ignoring parameter. Reason: incorrect format." + separator + "\t" + arg + ""); continue; } int commandEnd = arg.IndexOf('='); bool isCommandOnly = commandEnd == -1; string command = isCommandOnly ? arg.Substring(1) : arg.Substring(1, commandEnd - 1); if (isCommandOnly && !string.Equals(command, QUIET_COMMAND)) { executor.Invoke("Ignoring parameter. Reason: incorrect format." + separator + "\t" + arg + ""); continue; } string value = arg.Substring(commandEnd + 1); switch (command) { case INSTANCE_COMMAND: Filing filing = new Filing(executor, value); fp.Filings.Add(filing); break; case REPORTS_FOLDER_COMMAND: fp.SetReportsFolder(value, "Arguments"); break; case REPORT_FORMAT_COMMAND: fp.SetReportFormat(value, "Arguments"); break; case HTML_REPORT_FORMAT_COMMAND: fp.SetHtmlReportFormat(value, "Arguments"); break; case REMOTE_CACHE_POLICY_COMMAND: fp.SetRemoteFileCachePolicy(value, "Arguments"); break; case QUIET_COMMAND: fp.Quiet = true; break; case SAVEAS_COMMAND: fp.SetSaveAs(value, "Arguments"); break; case XSLT_STYLESHEET_COMMAND: fp.SetXsltStylesheetPath(value, "Arguments"); break; default: executor.Invoke("Arguments: Ignoring parameter " + command + ". Reason: unrecognized command " + command + "" + separator + "\t" + arg + ""); break; } } return(fp); }
/// <summary> /// <para>This constructor expects you to pass the name of the rules file WITHOUT the extension.</para> /// <para>See <seealso cref="RulesEngineUtils.DefaultRulesFile"/> (public)</para> /// <para>See reportBuilderInstance.<seealso cref="SetRulesFile"/> (public)</para> /// </summary> /// <param name="rulesFileNameIn"> /// <para>The name of the rules file WITHOUT the extension. Default: <see cref="RulesEngineUtils.DefaultRulesFile"/></para> /// </param> /// <param name="type"> /// <para>The format(s) to output. Possible values:</para> /// <para> - <see cref="ReportFormat"/>.Xml</para> /// <para> - <see cref="ReportFormat"/>.Html</para> /// <para> - <see cref="ReportFormat"/>.HtmlAndXml</para> /// </param> /// <param name="htmlFormat"> /// <para>The HTML format to output, if <see cref="ReportFormat"/> contains 'Html'.</para> /// <para>Possible values:</para> /// <para> - <see cref="HtmlReportFormat"/>.Complete</para> /// <para> - <see cref="HtmlReportFormat"/>.Fragment</para> /// </param> public ReportBuilder(UpdateStatusExecutor executor, string rulesFileNameIn, ReportFormat type, HtmlReportFormat htmlFormat ) { // plamen this.executor = executor; this.currentAssemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); this.HtmlReportFormat = htmlFormat; this.ReportFormat = type; this.SetRulesFile( rulesFileNameIn ); }
private static bool UnzipPackage(UpdateStatusExecutor executor, Filing f, string zipPath, out string[] zipFiles ) { zipFiles = new string[ 0 ]; string errorMsg; if( !ZipUtilities.TryUnzipAndUncompressFiles( f.InstancePath, zipPath, out zipFiles, out errorMsg ) ) { executor.Invoke( "Error: The ZIP file cannot be opened." ); executor.Invoke( "\tSkipping filing: " + f.InstancePath ); return false; } return true; }
public static FilingProcessor Load(UpdateStatusExecutor executor, params string[] args) { FilingProcessor fp = new FilingProcessor(executor); //return fp; foreach( string arg in args ) { if( !arg.StartsWith( "/" ) ) { executor.Invoke( "Ignoring parameter. Reason: incorrect format." + separator + "\t" + arg +"" ); continue; } int commandEnd = arg.IndexOf( '=' ); bool isCommandOnly = commandEnd == -1; string command = isCommandOnly ? arg.Substring( 1 ) : arg.Substring( 1, commandEnd - 1 ); if( isCommandOnly && !string.Equals( command, QUIET_COMMAND ) ) { executor.Invoke( "Ignoring parameter. Reason: incorrect format." + separator + "\t" + arg + "" ); continue; } string value = arg.Substring( commandEnd + 1 ); switch( command ) { case INSTANCE_COMMAND: Filing filing = new Filing(executor, value ); fp.Filings.Add( filing ); break; case REPORTS_FOLDER_COMMAND: fp.SetReportsFolder( value, "Arguments" ); break; case REPORT_FORMAT_COMMAND: fp.SetReportFormat( value, "Arguments" ); break; case HTML_REPORT_FORMAT_COMMAND: fp.SetHtmlReportFormat( value, "Arguments" ); break; case REMOTE_CACHE_POLICY_COMMAND: fp.SetRemoteFileCachePolicy( value, "Arguments" ); break; case QUIET_COMMAND: fp.Quiet = true; break; case SAVEAS_COMMAND: fp.SetSaveAs( value, "Arguments" ); break; case XSLT_STYLESHEET_COMMAND: fp.SetXsltStylesheetPath( value, "Arguments" ); break; default: executor.Invoke( "Arguments: Ignoring parameter " + command + ". Reason: unrecognized command " + command + "" + separator + "\t" + arg + "" ); break; } } return fp; }