private static void Main(string[] args) { try { Log.InitLog(args[0]); // Get customer rules defined in ETLProcessor definitions. Log.Write("Test"); #if Debug HashCodeTest.TestHashSystem(); #endif Log.Write("Test"); string arg2 = "out.txt"; if (args.Length >= 2) { arg2 = args[1] ?? "out.txt"; } client = new ClientETLProcess(args[0], arg2 ?? "out.txt"); // input data from basic record types (Statement, Balance Forward, Member Files) client.PopulateRecords(); // Enact client business rules List <OutputDoc> outputDocs = client.ProcessRecords( out IEnumerable <DataRow> membersWithoutStatements , out IEnumerable <DataRow> balancesWithoutStatements , out IEnumerable <DataRow> statementsWithoutMembers); // Export SQL reports to LocalDB file. client.ExportReports(); DelRet <bool> SqlReportCheck = client.GetCheck_SQL_Output(new object[] { client.TablesByType[typeof(Record_Statement)].First() }); bool success = SqlReportCheck(); // Report on these, other than returned outputDocs, probably by SQLBulkCopy to a new or proscribed table, // or output to csv. // output data to client profiles client.XMLExport(outputDocs); //throw new Exception("Finish implementing ProcessDocs."); /**********************************/ // only remove debug if completes. Log.Remove(); } catch (Exception err) { string Message = err.Message; string StackTrace = err.StackTrace; string SourceApplication = err.Source; Exception inner = err.InnerException; var DataDictionary = err.Data; Log.Write(err.ToString()); Console.Write(String.Format("Error:\n\n{0}", err.ToString())); } finally { CleanUp(); } }
private void Start() { print("Start"); HashCodeTest script = new HashCodeTest(); int hash1 = script.GetHashCode(); //608222976 int hash2 = typeof(HashCodeTest).GetHashCode(); //-440405496 int hash3 = script.GetType().GetHashCode();; //-440405496 HashCodeTest script2 = new HashCodeTest(); int hash4 = script2.GetHashCode(); //970243840 int hash5 = typeof(HashCodeTest).GetHashCode(); //-440405496 int hash6 = script2.GetType().GetHashCode();; //-440405496 print("script.GetHashCode() = " + hash1); print("typeof(HashCodeTest).GetHashCode() = " + hash2); print("script.GetType().GetHashCode() = " + hash3); print("script2.GetHashCode() = " + hash4); print("typeof(HashCodeTest).GetHashCode() = " + hash5); print("script2.GetType().GetHashCode() = " + hash6); }