scripts
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace UnityEngine.Networking
|
||||
{
|
||||
// Token: 0x0200028D RID: 653
|
||||
public class MultipartFormDataSection : IMultipartFormSection
|
||||
{
|
||||
// Token: 0x06002CD8 RID: 11480 RVA: 0x0003EB88 File Offset: 0x0003CD88
|
||||
public MultipartFormDataSection(string name, byte[] data, string contentType)
|
||||
{
|
||||
if (data == null || data.Length < 1)
|
||||
{
|
||||
throw new ArgumentException("Cannot create a multipart form data section without body data");
|
||||
}
|
||||
this.name = name;
|
||||
this.data = data;
|
||||
this.content = contentType;
|
||||
}
|
||||
|
||||
// Token: 0x06002CD9 RID: 11481 RVA: 0x0003EBC4 File Offset: 0x0003CDC4
|
||||
public MultipartFormDataSection(string name, byte[] data)
|
||||
: this(name, data, null)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06002CDA RID: 11482 RVA: 0x0003EBD0 File Offset: 0x0003CDD0
|
||||
public MultipartFormDataSection(byte[] data)
|
||||
: this(null, data)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06002CDB RID: 11483 RVA: 0x0003EBDC File Offset: 0x0003CDDC
|
||||
public MultipartFormDataSection(string name, string data, Encoding encoding, string contentType)
|
||||
{
|
||||
if (data == null || data.Length < 1)
|
||||
{
|
||||
throw new ArgumentException("Cannot create a multipart form data section without body data");
|
||||
}
|
||||
byte[] bytes = encoding.GetBytes(data);
|
||||
this.name = name;
|
||||
this.data = bytes;
|
||||
if (contentType != null && !contentType.Contains("encoding="))
|
||||
{
|
||||
contentType = contentType.Trim() + "; encoding=" + encoding.WebName;
|
||||
}
|
||||
this.content = contentType;
|
||||
}
|
||||
|
||||
// Token: 0x06002CDC RID: 11484 RVA: 0x0003EC60 File Offset: 0x0003CE60
|
||||
public MultipartFormDataSection(string name, string data, string contentType)
|
||||
: this(name, data, Encoding.UTF8, contentType)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06002CDD RID: 11485 RVA: 0x0003EC74 File Offset: 0x0003CE74
|
||||
public MultipartFormDataSection(string name, string data)
|
||||
: this(name, data, "text/plain")
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06002CDE RID: 11486 RVA: 0x0003EC84 File Offset: 0x0003CE84
|
||||
public MultipartFormDataSection(string data)
|
||||
: this(null, data)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x17000A33 RID: 2611
|
||||
// (get) Token: 0x06002CDF RID: 11487 RVA: 0x0003EC90 File Offset: 0x0003CE90
|
||||
public string sectionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000A34 RID: 2612
|
||||
// (get) Token: 0x06002CE0 RID: 11488 RVA: 0x0003ECAC File Offset: 0x0003CEAC
|
||||
public byte[] sectionData
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.data;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000A35 RID: 2613
|
||||
// (get) Token: 0x06002CE1 RID: 11489 RVA: 0x0003ECC8 File Offset: 0x0003CEC8
|
||||
public string fileName
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000A36 RID: 2614
|
||||
// (get) Token: 0x06002CE2 RID: 11490 RVA: 0x0003ECE0 File Offset: 0x0003CEE0
|
||||
public string contentType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.content;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400088C RID: 2188
|
||||
private string name;
|
||||
|
||||
// Token: 0x0400088D RID: 2189
|
||||
private byte[] data;
|
||||
|
||||
// Token: 0x0400088E RID: 2190
|
||||
private string content;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user