예제 #1
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()
     });
 }
예제 #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);
        }