コード例 #1
0
        public LoggingEntry(Guid id, LoggingDeserializeContext context)
        {
            Id       = id;
            LogLevel = (LogLevel)context.br.ReadByte();
            EventId  = new EventId(context.br.ReadInt32(), context.br.ReadNullableString());
            Message  = context.br.ReadNullableString();

            if (context.br.ReadBoolean())
            {
                Exception = new LoggingException(context);
            }

            if (context.br.ReadBoolean())
            {
                var count = context.br.ReadInt32();
                var list  = new List <KeyValuePair <string, string?> >(count);
                for (var i = 0; i < count; i++)
                {
                    var key   = context.br.ReadString();
                    var value = context.br.ReadNullableString();
                    list.Add(new KeyValuePair <string, string?>(key, value));
                }
                Data = list;
            }
        }
コード例 #2
0
 public LoggingException(LoggingDeserializeContext context)
 {
     Message    = context.br.ReadNullableString();
     StackTrace = context.br.ReadNullableString();
     HelpLink   = context.br.ReadNullableString();
     Source     = context.br.ReadNullableString();
 }