/// <inheritdoc />
 public sealed override void Write(BlobSerializationContext context)
 {
     WriteContents(context);
     if (ExtraData != null)
     {
         context.Writer.WriteBytes(ExtraData);
     }
 }
        /// <summary>
        /// Writes the named argument to the provided output stream.
        /// </summary>
        public void Write(BlobSerializationContext context)
        {
            var writer = context.Writer;

            writer.WriteByte((byte)MemberType);
            TypeSignature.WriteFieldOrPropType(writer, ArgumentType);
            writer.WriteSerString(MemberName);
            Argument.Write(context);
        }
Beispiel #3
0
        /// <inheritdoc />
        protected override void WriteContents(BlobSerializationContext context)
        {
            var writer = context.Writer;

            writer.WriteByte((byte)Attributes);
            writer.WriteCompressedUInt32((uint)TypeArguments.Count);
            for (int i = 0; i < TypeArguments.Count; i++)
            {
                TypeArguments[i].Write(context);
            }
        }
        /// <inheritdoc />
        protected override void WriteContents(BlobSerializationContext context)
        {
            var writer = context.Writer;

            writer.WriteByte((byte)Attributes);
            writer.WriteCompressedUInt32((uint)VariableTypes.Count);

            foreach (var type in VariableTypes)
            {
                type.Write(context);
            }
        }
        /// <inheritdoc />
        protected override void WriteContents(BlobSerializationContext context)
        {
            context.Writer.WriteUInt16(CustomAttributeSignaturePrologue);

            for (int i = 0; i < FixedArguments.Count; i++)
            {
                FixedArguments[i].Write(context);
            }

            context.Writer.WriteUInt16((ushort)NamedArguments.Count);
            for (int i = 0; i < NamedArguments.Count; i++)
            {
                NamedArguments[i].Write(context);
            }
        }
Beispiel #6
0
        /// <summary>
        /// Writes the fixed argument to the provided output stream.
        /// </summary>
        public void Write(BlobSerializationContext context)
        {
            var writer = new CustomAttributeArgumentWriter(context);

            writer.WriteArgument(this);
        }
 public CustomAttributeArgumentWriter(BlobSerializationContext context)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
 }
 /// <summary>
 /// Serializes the blob (without extra data) to an output stream.
 /// </summary>
 protected abstract void WriteContents(BlobSerializationContext context);
Beispiel #9
0
 /// <inheritdoc />
 protected override void WriteContents(BlobSerializationContext context)
 {
     context.Writer.WriteByte((byte)Attributes);
     WriteParametersAndReturnType(context);
 }