/// <summary> /// Encodes a named argument (field or property). /// Returns a triplet of encoders that must be used in the order they appear in the parameter list. /// </summary> /// <param name="isField">True to encode a field, false to encode a property.</param> /// <param name="type">Use first, to encode the type of the argument.</param> /// <param name="name">Use second, to encode the name of the field or property.</param> /// <param name="literal">Use third, to encode the literal value of the argument.</param> public void AddArgument(bool isField, out NamedArgumentTypeEncoder type, out NameEncoder name, out LiteralEncoder literal) { Builder.WriteByte(isField ? (byte)CustomAttributeNamedArgumentKind.Field : (byte)CustomAttributeNamedArgumentKind.Property); type = new NamedArgumentTypeEncoder(Builder); name = new NameEncoder(Builder); literal = new LiteralEncoder(Builder); }
public void AddArgument(bool isField, out NamedArgumentTypeEncoder type, out NameEncoder name, out LiteralEncoder literal) { Builder.WriteByte(isField ? (byte)CustomAttributeNamedArgumentKind.Field : (byte)CustomAttributeNamedArgumentKind.Property); type = new NamedArgumentTypeEncoder(Builder); name = new NameEncoder(Builder); literal = new LiteralEncoder(Builder); }