예제 #1
0
 private TseEntry(TseEntryContext context, TseAccess tseAccess)
 {
     this.tseAccess    = tseAccess;
     id                = worm_entry_id(context.ptr);
     IsSystemLog       = worm_entry_type(context.ptr) == WormEntryType.SystemLog;
     ProcessDataLength = worm_entry_processDataLength(context.ptr);
     Console.WriteLine("Created WormEntry #" + id);
 }
예제 #2
0
        static internal TseEntry first(TseAccess tseAccess)
        {
            TseEntryContext context = new TseEntryContext(tseAccess.tse_context);
            int             err     = worm_entry_iterate_first(context.ptr);

            if (err != 0)
            {
                throw new Exception("Failed to read WormEntry, error: " + err);
            }
            return(worm_entry_isValid(context.ptr) != 0 ? new TseEntry(context, tseAccess) : null);
        }