Beispiel #1
0
        public IoCommandStartEvent ReadIoCommandStartEvent(ExtendedBinaryReader reader)
        {
            var evt = new IoCommandStartEvent
            {
                Uid = reader.Read7BitEncodedInt(),
                ProcessInvocationUid = reader.Read7BitEncodedInt(),
                Kind           = (IoCommandKind)reader.ReadByte(),
                Location       = GetTextById(reader.Read7BitEncodedInt()),
                Path           = GetTextById(reader.Read7BitEncodedInt()),
                TimeoutSeconds = reader.ReadNullableInt32(),
                Command        = reader.ReadNullableString(),
                TransactionId  = GetTextById(reader.Read7BitEncodedInt()),
            };

            var argCount = reader.Read7BitEncodedInt();

            if (argCount > 0)
            {
                evt.Arguments = new KeyValuePair <string, object> [argCount];
                for (var i = 0; i < argCount; i++)
                {
                    var name  = GetTextById(reader.Read7BitEncodedInt());
                    var value = reader.ReadObject();
                    evt.Arguments[i] = new KeyValuePair <string, object>(name, value);
                }
            }

            return(evt);
        }
Beispiel #2
0
        public LogEvent ReadLogEvent(ExtendedBinaryReader reader)
        {
            var evt = new LogEvent
            {
                TransactionId        = GetTextById(reader.Read7BitEncodedInt()),
                Text                 = reader.ReadString(),
                Severity             = (LogSeverity)reader.ReadByte(),
                ProcessInvocationUID = reader.ReadNullableInt32()
            };

            var argCount = reader.Read7BitEncodedInt();

            if (argCount > 0)
            {
                evt.Arguments = new KeyValuePair <string, object> [argCount];
                for (var i = 0; i < argCount; i++)
                {
                    var key   = GetTextById(reader.Read7BitEncodedInt());
                    var value = reader.ReadObject();
                    evt.Arguments[i] = new KeyValuePair <string, object>(key, value);
                }
            }

            return(evt);
        }
Beispiel #3
0
 public RowOwnerChangedEvent ReadRowOwnerChangedEvent(ExtendedBinaryReader reader)
 {
     return(new RowOwnerChangedEvent
     {
         RowUid = reader.Read7BitEncodedInt(),
         PreviousProcessInvocationUid = reader.Read7BitEncodedInt(),
         NewProcessInvocationUid = reader.ReadNullableInt32()
     });
 }
Beispiel #4
0
        public IoCommandEndEvent ReadIoCommandEndEvent(ExtendedBinaryReader reader)
        {
            var evt = new IoCommandEndEvent
            {
                Uid = reader.Read7BitEncodedInt(),
                AffectedDataCount = reader.ReadNullableInt32(),
                ErrorMessage      = reader.ReadNullableString(),
            };

            return(evt);
        }
Beispiel #5
0
 public ProcessInvocationStartEvent ReadProcessInvocationStartEvent(ExtendedBinaryReader reader)
 {
     return(new ProcessInvocationStartEvent
     {
         InvocationUID = reader.Read7BitEncodedInt(),
         InstanceUID = reader.Read7BitEncodedInt(),
         InvocationCounter = reader.Read7BitEncodedInt(),
         Type = reader.ReadString(),
         Kind = (ProcessKind)reader.ReadByte(),
         Name = reader.ReadString(),
         Topic = reader.ReadNullableString(),
         CallerInvocationUID = reader.ReadNullableInt32()
     });
 }
Beispiel #6
0
        public RowValueChangedEvent ReadRowValueChangedEvent(ExtendedBinaryReader reader)
        {
            var evt = new RowValueChangedEvent
            {
                RowUid = reader.Read7BitEncodedInt(),
                ProcessInvocationUID = reader.ReadNullableInt32()
            };

            var columnCount = reader.Read7BitEncodedInt();

            if (columnCount > 0)
            {
                evt.Values = new KeyValuePair <string, object> [columnCount];
                for (var i = 0; i < columnCount; i++)
                {
                    var column = GetTextById(reader.Read7BitEncodedInt());
                    var value  = reader.ReadObject();
                    evt.Values[i] = new KeyValuePair <string, object>(column, value);
                }
            }

            return(evt);
        }