コード例 #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));
        }
コード例 #2
0
        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() });
        }
コード例 #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;
 }
コード例 #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);
        }
コード例 #6
0
		internal LogRecord (_LogRecord logRecord)
		{
			flags = (LogRecordFlags) logRecord.dwCrmFlags;
			sequence = logRecord.dwSequenceNumber;
			record = logRecord.blobUserData;
		}
コード例 #7
0
        bool _ICompensator._PrepareRecord(_LogRecord record)
        {
            LogRecord rec = new LogRecord(record);

            return(this.PrepareRecord(rec));
        }
コード例 #8
0
        bool _ICompensator._CommitRecord(_LogRecord record)
        {
            LogRecord rec = new LogRecord(record);

            return(this.CommitRecord(rec));
        }
コード例 #9
0
        bool _ICompensator._AbortRecord(_LogRecord record)
        {
            LogRecord rec = new LogRecord(record);

            return(this.AbortRecord(rec));
        }
コード例 #10
0
        LogRecord ReadLogRecord(int index)
        {
            _LogRecord record = _monitor.GetLogRecord(index);

            return(new LogRecord(record));
        }
コード例 #11
0
 internal LogRecord(_LogRecord r)
 {
     _flags = (LogRecordFlags)r.dwCrmFlags;
     _seq   = r.dwSequenceNumber;
     _data  = Packager.Deserialize(new BlobPackage(r.blobUserData));
 }
コード例 #12
0
 internal LogRecord(_LogRecord r)
 {
     this._flags = (LogRecordFlags) r.dwCrmFlags;
     this._seq = r.dwSequenceNumber;
     this._data = Packager.Deserialize(new BlobPackage(r.blobUserData));
 }
コード例 #13
0
ファイル: LogRecord.cs プロジェクト: zlxy/Genesis-3D
 internal LogRecord(_LogRecord logRecord)
 {
     flags    = (LogRecordFlags)logRecord.dwCrmFlags;
     sequence = logRecord.dwSequenceNumber;
     record   = logRecord.blobUserData;
 }