// Token: 0x06000339 RID: 825 RVA: 0x000125A8 File Offset: 0x000107A8 public void SetContentType(MajorContentType contentType, MimeString boundaryValue) { if (contentType == MajorContentType.Multipart) { int srcOffset; int num; byte[] data = boundaryValue.GetData(out srcOffset, out num); int num2 = MimeString.TwoDashes.Length + num + MimeString.TwoDashes.Length; byte[] array = new byte[num2]; int num3 = MimeString.TwoDashes.Length; Buffer.BlockCopy(MimeString.TwoDashes, 0, array, 0, num3); Buffer.BlockCopy(data, srcOffset, array, num3, num); num3 += num; this.boundaryCrc = ByteString.ComputeCrc(array, 0, num3); Buffer.BlockCopy(MimeString.TwoDashes, 0, array, num3, MimeString.TwoDashes.Length); num3 += MimeString.TwoDashes.Length; this.endBoundaryCrc = ByteString.ComputeCrc(array, 0, num3); this.boundaryValue = new MimeString(array, 0, num3); } else { this.boundaryValue = default(MimeString); this.boundaryCrc = 0U; this.endBoundaryCrc = 0U; } this.contentType = contentType; }
// Token: 0x06000320 RID: 800 RVA: 0x0001172E File Offset: 0x0000F92E public void SetContentType(MajorContentType contentType, MimeString boundaryValue) { this.currentLevel.SetContentType(contentType, boundaryValue); if (contentType != MajorContentType.Multipart) { this.nextBoundaryLevel = -1; } }
public void SetContentType(MajorContentType contentType, MimeString boundaryValue) { if (contentType == MajorContentType.Multipart) { int offset; int count; var data = boundaryValue.GetData(out offset, out count); var numArray = new byte[MimeString.TwoDashes.Length + count + MimeString.TwoDashes.Length]; var length = MimeString.TwoDashes.Length; System.Buffer.BlockCopy(MimeString.TwoDashes, 0, numArray, 0, length); System.Buffer.BlockCopy(data, offset, numArray, length, count); var num1 = length + count; boundaryCrc = Internal.ByteString.ComputeCrc(numArray, 0, num1); System.Buffer.BlockCopy(MimeString.TwoDashes, 0, numArray, num1, MimeString.TwoDashes.Length); var num2 = num1 + MimeString.TwoDashes.Length; endBoundaryCrc = Internal.ByteString.ComputeCrc(numArray, 0, num2); this.boundaryValue = new MimeString(numArray, 0, num2); } else { this.boundaryValue = new MimeString(); boundaryCrc = 0U; endBoundaryCrc = 0U; } this.ContentType = contentType; }
public void SetContentType(MajorContentType contentType, MimeString boundaryValue) { currentLevel.SetContentType(contentType, boundaryValue); if (contentType == MajorContentType.Multipart) return; nextBoundaryLevel = -1; }