107 lines
5.3 KiB
C#
107 lines
5.3 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: 0x020002B4 RID: 692
|
|
[Token(Token = "0x20002B4")]
|
|
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: 0x06001232 RID: 4658 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6001232")]
|
|
[Address(RVA = "0x2226610", Offset = "0x2225410", VA = "0x182226610")]
|
|
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: 0x170003B0 RID: 944
|
|
// (get) Token: 0x06001233 RID: 4659 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x170003B0")]
|
|
public ContentDisposition ContentDisposition
|
|
{
|
|
[Token(Token = "0x6001233")]
|
|
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")]
|
|
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: 0x170003B1 RID: 945
|
|
// (get) Token: 0x06001234 RID: 4660 RVA: 0x00002050 File Offset: 0x00000250
|
|
// (set) Token: 0x06001235 RID: 4661 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x170003B1")]
|
|
public string Name
|
|
{
|
|
[Token(Token = "0x6001234")]
|
|
[Address(RVA = "0x22267C0", Offset = "0x22255C0", VA = "0x1822267C0")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
[Token(Token = "0x6001235")]
|
|
[Address(RVA = "0x2226890", Offset = "0x2225690", VA = "0x182226890")]
|
|
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: 0x170003B2 RID: 946
|
|
// (get) Token: 0x06001236 RID: 4662 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x170003B2")]
|
|
public Encoding NameEncoding
|
|
{
|
|
[Token(Token = "0x6001236")]
|
|
[Address(RVA = "0x3F63D0", Offset = "0x3F51D0", VA = "0x1803F63D0")]
|
|
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: 0x06001237 RID: 4663 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001237")]
|
|
[Address(RVA = "0x2226320", Offset = "0x2225120", VA = "0x182226320")]
|
|
public static Attachment CreateAttachmentFromString(string content, string name, Encoding contentEncoding, string mediaType)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x04000ACF RID: 2767
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4000ACF")]
|
|
private ContentDisposition contentDisposition;
|
|
|
|
// Token: 0x04000AD0 RID: 2768
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4000AD0")]
|
|
private Encoding nameEncoding;
|
|
}
|
|
}
|