Class AttachmentProperties
public class AttachmentProperties : IHttpSerializable
- Inheritance
-
AttachmentProperties
- Implements
- Derived
- Inherited Members
Constructors
AttachmentProperties(string)
protected AttachmentProperties(string fileName)
Parameters
fileNamestringName of the file (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).
AttachmentProperties(string, Stream)
public AttachmentProperties(string fileName, Stream stream)
Parameters
fileNamestringName of the file (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).
streamStreamContent of the file.
Properties
Description
Description for the file (max 1024 characters for attachments sent by message, max 200 characters for attachments used for sticker creation).
public string? Description { get; set; }
Property Value
FileName
Name of the file (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).
public string FileName { get; set; }
Property Value
SupportsHttpSerialization
public virtual bool SupportsHttpSerialization { get; }
Property Value
Title
Title of the attachment.
public string? Title { get; set; }
Property Value
Methods
GetStream()
protected Stream? GetStream()
Returns
Serialize()
Serializes the object or its part into HttpContent.
public virtual HttpContent Serialize()
Returns
WithDescription(string?)
Description for the file (max 1024 characters for attachments sent by message, max 200 characters for attachments used for sticker creation).
public AttachmentProperties WithDescription(string? description)
Parameters
descriptionstring
Returns
WithFileName(string)
Name of the file (max 1024 characters for attachments sent by message, 2-30 characters for attachments used for sticker creation).
public AttachmentProperties WithFileName(string fileName)
Parameters
fileNamestring
Returns
WithTitle(string?)
Title of the attachment.
public AttachmentProperties WithTitle(string? title)
Parameters
titlestring
Returns
WriteTo(Utf8JsonWriter, int)
protected virtual void WriteTo(Utf8JsonWriter writer, int attachmentId)
Parameters
writerUtf8JsonWriterattachmentIdint