Ejemplo n.º 1
0
        bool _ICompensator._AbortRecord(_LogRecord record)
        {
            DBG.Assert(_clerk != null, "Method call made on Compensator with no clerk!");

            DBG.Info(DBG.CRM, "Compensator: abort-record");
            LogRecord R = new LogRecord(record);

            return(AbortRecord(R));
        }
        object _IFormatLogRecords.GetColumn(_LogRecord r)
        {
            LogRecord record = new LogRecord(r);

            if (this is IFormatLogRecords)
            {
                return(((IFormatLogRecords)this).Format(record));
            }
            return(new string[] { record.Flags.ToString(), record.Sequence.ToString(CultureInfo.CurrentUICulture), record.Record.ToString() });
        }
Ejemplo n.º 3
0
        Object _IFormatLogRecords.GetColumn(_LogRecord r)
        {
            LogRecord real = new LogRecord(r);

            if (this is IFormatLogRecords)
            {
                return(((IFormatLogRecords)this).Format(real));
            }

            String[] format = new String[3];
            format[0] = real.Flags.ToString();
            format[1] = real.Sequence.ToString();
            format[2] = real.Record.ToString();
            return(format);
        }
 public unsafe _LogRecord GetLogRecord(int index)
 {
     tagCrmLogRecordRead read;
     ICrmMonitorLogRecords* recordsPtr = this._pMon;
     int modopt(IsLong) errorCode = **(((int*) recordsPtr))[0x18](recordsPtr, index, &read);
     if (errorCode < 0)
     {
         Marshal.ThrowExceptionForHR(errorCode);
     }
     _LogRecord record = new _LogRecord {
         dwCrmFlags = *((int*) &read),
         dwSequenceNumber = *((int*) (&read + 4))
     };
     record.blobUserData.cbSize = *((int*) (&read + 8));
     IntPtr modopt(IsConst) ptr = new IntPtr(*((void**) (&read + 12)));
     record.blobUserData.pBlobData = ptr;
     return record;
 }
Ejemplo n.º 5
0
        public unsafe _LogRecord GetLogRecord(int index)
        {
            tagCrmLogRecordRead    read;
            ICrmMonitorLogRecords *recordsPtr = this._pMon;

            int modopt(IsLong) errorCode = **(((int *)recordsPtr))[0x18](recordsPtr, index, &read);

            if (errorCode < 0)
            {
                Marshal.ThrowExceptionForHR(errorCode);
            }
            _LogRecord record = new _LogRecord {
                dwCrmFlags       = *((int *)&read),
                dwSequenceNumber = *((int *)(&read + 4))
            };

            record.blobUserData.cbSize = *((int *)(&read + 8));
            IntPtr modopt(IsConst) ptr = new IntPtr(*((void **)(&read + 12)));

            record.blobUserData.pBlobData = ptr;
            return(record);
        }
Ejemplo n.º 6
0
		internal LogRecord (_LogRecord logRecord)
		{
			flags = (LogRecordFlags) logRecord.dwCrmFlags;
			sequence = logRecord.dwSequenceNumber;
			record = logRecord.blobUserData;
		}
        bool _ICompensator._PrepareRecord(_LogRecord record)
        {
            LogRecord rec = new LogRecord(record);

            return(this.PrepareRecord(rec));
        }
        bool _ICompensator._CommitRecord(_LogRecord record)
        {
            LogRecord rec = new LogRecord(record);

            return(this.CommitRecord(rec));
        }
        bool _ICompensator._AbortRecord(_LogRecord record)
        {
            LogRecord rec = new LogRecord(record);

            return(this.AbortRecord(rec));
        }
Ejemplo n.º 10
0
        LogRecord ReadLogRecord(int index)
        {
            _LogRecord record = _monitor.GetLogRecord(index);

            return(new LogRecord(record));
        }
Ejemplo n.º 11
0
 internal LogRecord(_LogRecord r)
 {
     _flags = (LogRecordFlags)r.dwCrmFlags;
     _seq   = r.dwSequenceNumber;
     _data  = Packager.Deserialize(new BlobPackage(r.blobUserData));
 }
 internal LogRecord(_LogRecord r)
 {
     this._flags = (LogRecordFlags) r.dwCrmFlags;
     this._seq = r.dwSequenceNumber;
     this._data = Packager.Deserialize(new BlobPackage(r.blobUserData));
 }
Ejemplo n.º 13
0
 internal LogRecord(_LogRecord logRecord)
 {
     flags    = (LogRecordFlags)logRecord.dwCrmFlags;
     sequence = logRecord.dwSequenceNumber;
     record   = logRecord.blobUserData;
 }