107 lines
5.2 KiB
C#
107 lines
5.2 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Net.Mime;
|
|
using System.Text;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Net.Mail
|
|
{
|
|
/// <summary>Represents an attachment to an email.</summary>
|
|
// Token: 0x020002B0 RID: 688
|
|
[Token(Token = "0x20002B0")]
|
|
public class Attachment : AttachmentBase
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Mail.Attachment" /> class with the specified stream, name, and MIME type information.</summary>
|
|
/// <param name="contentStream">A readable <see cref="T:System.IO.Stream" /> that contains the content for this attachment.</param>
|
|
/// <param name="name">A <see cref="T:System.String" /> that contains the value for the <see cref="P:System.Net.Mime.ContentType.Name" /> property of the <see cref="T:System.Net.Mime.ContentType" /> associated with this attachment. This value can be <see langword="null" />.</param>
|
|
/// <param name="mediaType">A <see cref="T:System.String" /> that contains the MIME Content-Header information for this attachment. This value can be <see langword="null" />.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="stream" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.FormatException">
|
|
/// <paramref name="mediaType" /> is not in the correct format.</exception>
|
|
// Token: 0x0600121C RID: 4636 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x600121C")]
|
|
[Address(RVA = "0x8A0A70", Offset = "0x89FA70", VA = "0x1808A0A70")]
|
|
public Attachment(Stream contentStream, string name, string mediaType)
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets the MIME content disposition for this attachment.</summary>
|
|
/// <returns>A <see cref="T:System.Net.Mime.ContentDisposition" /> that provides the presentation information for this attachment.</returns>
|
|
// Token: 0x170003AC RID: 940
|
|
// (get) Token: 0x0600121D RID: 4637 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x170003AC")]
|
|
public ContentDisposition ContentDisposition
|
|
{
|
|
[Token(Token = "0x600121D")]
|
|
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the MIME content type name value in the content type associated with this attachment.</summary>
|
|
/// <returns>A <see cref="T:System.String" /> that contains the value for the content type <paramref name="name" /> represented by the <see cref="P:System.Net.Mime.ContentType.Name" /> property.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The value specified for a set operation is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.ArgumentException">The value specified for a set operation is <see cref="F:System.String.Empty" /> ("").</exception>
|
|
// Token: 0x170003AD RID: 941
|
|
// (get) Token: 0x0600121E RID: 4638 RVA: 0x00002050 File Offset: 0x00000250
|
|
// (set) Token: 0x0600121F RID: 4639 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x170003AD")]
|
|
public string Name
|
|
{
|
|
[Token(Token = "0x600121E")]
|
|
[Address(RVA = "0x8A0C20", Offset = "0x89FC20", VA = "0x1808A0C20")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
[Token(Token = "0x600121F")]
|
|
[Address(RVA = "0x8A0CF0", Offset = "0x89FCF0", VA = "0x1808A0CF0")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Specifies the encoding for the <see cref="T:System.Net.Mail.Attachment" /><see cref="P:System.Net.Mail.Attachment.Name" />.</summary>
|
|
/// <returns>An <see cref="T:System.Text.Encoding" /> value that specifies the type of name encoding. The default value is determined from the name of the attachment.</returns>
|
|
// Token: 0x170003AE RID: 942
|
|
// (get) Token: 0x06001220 RID: 4640 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x170003AE")]
|
|
public Encoding NameEncoding
|
|
{
|
|
[Token(Token = "0x6001220")]
|
|
[Address(RVA = "0x41CEF0", Offset = "0x41BEF0", VA = "0x18041CEF0")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Creates a mail attachment using the content from the specified string, the specified MIME content type name, character encoding, and MIME header information for the attachment.</summary>
|
|
/// <param name="content">A <see cref="T:System.String" /> that contains the content for this attachment.</param>
|
|
/// <param name="name">The MIME content type name value in the content type associated with this attachment.</param>
|
|
/// <param name="contentEncoding">An <see cref="T:System.Text.Encoding" />. This value can be <see langword="null" />.</param>
|
|
/// <param name="mediaType">A <see cref="T:System.String" /> that contains the MIME Content-Header information for this attachment. This value can be <see langword="null" />.</param>
|
|
/// <returns>An object of type <see cref="T:System.Net.Mail.Attachment" />.</returns>
|
|
// Token: 0x06001221 RID: 4641 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001221")]
|
|
[Address(RVA = "0x8A0780", Offset = "0x89F780", VA = "0x1808A0780")]
|
|
public static Attachment CreateAttachmentFromString(string content, string name, Encoding contentEncoding, string mediaType)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x04000AC2 RID: 2754
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4000AC2")]
|
|
private ContentDisposition contentDisposition;
|
|
|
|
// Token: 0x04000AC3 RID: 2755
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4000AC3")]
|
|
private Encoding nameEncoding;
|
|
}
|
|
}
|