public override bool BulkLoad(List <EventData> events, out List <Exception> exceptions) { exceptions = new List <Exception>(); if (events.Count == 1) { return(base.BulkLoad(events, out exceptions)); } try { DataTable et = Build_EventTable(); foreach (EventData e in events) { et.Rows.Add(new object[] { e.EventID.ToString(), e.ObjectID.ToString(), e.EventName, e.MachineName, e.ProcessName, e.EventTime.ToString("G") }); } ExecuteNonQuery enq = new ExecuteNonQuery(); enq.ImportDataTable(Authentication, et, et.TableName); return(exceptions.Count == 0); } catch { return(base.BulkLoad(events, out exceptions)); } }
public override bool BulkLoad(List <EventMetadata> meta, out List <Exception> exceptions) { exceptions = new List <Exception>(); if (meta.Count == 1) { return(base.BulkLoad(meta, out exceptions)); } try { DataTable mt = Build_MetadataTable(); foreach (EventMetadata m in meta) { mt.Rows.Add(new object[] { m.EventID.ToString(), m.Metadata, STEM.Sys.State.KeyManager.GetHash(m.Metadata) }); } ExecuteNonQuery enq = new ExecuteNonQuery(); enq.ImportDataTable(Authentication, mt, mt.TableName); return(exceptions.Count == 0); } catch { return(base.BulkLoad(meta, out exceptions)); } }
public override bool BulkLoad(List <ObjectData> objects, out List <Exception> exceptions) { exceptions = new List <Exception>(); if (objects.Count == 1) { return(base.BulkLoad(objects, out exceptions)); } try { DataTable ot = Build_ObjectsTable(); foreach (ObjectData o in objects) { ot.Rows.Add(new object[] { o.ID.ToString(), o.Name, o.CreationTime.ToString("G"), STEM.Sys.State.KeyManager.GetHash(o.Name) }); } ExecuteNonQuery enq = new ExecuteNonQuery(); enq.ImportDataTable(Authentication, ot, ot.TableName); return(exceptions.Count == 0); } catch { return(base.BulkLoad(objects, out exceptions)); } }