示例#1
0
        protected virtual void WriteTo(ObjectWriter writer)
        {
            writer.WriteValue(this.messageProvider);
            writer.WriteCompressedUInt((uint)this.errorCode);
            writer.WriteBoolean(this.isWarningAsError);

            int count = (this.arguments != null) ? arguments.Length : 0;

            writer.WriteCompressedUInt((uint)count);

            if (count > 0)
            {
                foreach (var arg in this.arguments)
                {
                    writer.WriteString(arg.ToString());
                }
            }
        }
示例#2
0
        protected virtual void WriteTo(ObjectWriter writer)
        {
            writer.WriteValue(_messageProvider);
            writer.WriteCompressedUInt((uint)_errorCode);
            writer.WriteInt32((int)_effectiveSeverity);
            writer.WriteInt32((int)_defaultSeverity);

            int count = _arguments?.Length ?? 0;

            writer.WriteCompressedUInt((uint)count);

            if (count > 0)
            {
                foreach (var arg in _arguments)
                {
                    writer.WriteString(arg.ToString());
                }
            }
        }
示例#3
0
        void IObjectWritable.WriteTo(ObjectWriter writer)
        {
            writer.WriteValue(_resourceSource);
            writer.WriteString(_nameOfLocalizableResource);
            var length = (uint)_formatArguments.Length;

            writer.WriteCompressedUInt(length);
            for (int i = 0; i < length; i++)
            {
                writer.WriteString(_formatArguments[i]);
            }
        }