Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
HttpListenerResponse.cs
Go to the documentation of this file.
4using System.IO;
7using System.Text;
9
10namespace System.Net;
11
12public sealed class HttpListenerResponse : IDisposable
13{
14 private enum ResponseState
15 {
16 Created,
19 Closed
20 }
21
23
25
27
28 private bool _keepAlive = true;
29
31
32 private string _statusDescription;
33
35
36 private static readonly int[] s_noResponseBody = new int[5] { 100, 101, 204, 205, 304 };
37
39
40 private long _contentLength;
41
42 private global::Interop.HttpApi.HTTP_RESPONSE _nativeResponse;
43
44 public WebHeaderCollection Headers
45 {
46 get
47 {
48 return _webHeaders;
49 }
50 set
51 {
53 string[] allKeys = value.AllKeys;
54 foreach (string name in allKeys)
55 {
56 _webHeaders.Add(name, value[name]);
57 }
58 }
59 }
60
61 public Encoding? ContentEncoding { get; set; }
62
63 public string? ContentType
64 {
65 get
66 {
67 return Headers["Content-Type"];
68 }
69 set
70 {
72 if (string.IsNullOrEmpty(value))
73 {
74 Headers.Remove("Content-Type");
75 }
76 else
77 {
78 Headers.Set("Content-Type", value);
79 }
80 }
81 }
82
84
86
88 {
89 get
90 {
92 }
93 set
94 {
98 {
100 }
102 if (value != 0)
103 {
104 _contentLength = -1L;
105 }
106 }
107 }
108
109 public bool SendChunked
110 {
111 get
112 {
113 return EntitySendFormat == EntitySendFormat.Chunked;
114 }
115 set
116 {
117 EntitySendFormat = (value ? EntitySendFormat.Chunked : EntitySendFormat.ContentLength);
118 }
119 }
120
121 public long ContentLength64
122 {
123 get
124 {
125 return _contentLength;
126 }
127 set
128 {
131 if (value >= 0)
132 {
134 _boundaryType = BoundaryType.ContentLength;
135 return;
136 }
138 }
139 }
140
142 {
143 get
144 {
145 return _cookies ?? (_cookies = new CookieCollection());
146 }
147 set
148 {
149 _cookies = value;
150 }
151 }
152
153 public bool KeepAlive
154 {
155 get
156 {
157 return _keepAlive;
158 }
159 set
160 {
163 }
164 }
165
167 {
168 get
169 {
172 return _responseStream;
173 }
174 }
175
176 public string? RedirectLocation
177 {
178 get
179 {
180 return Headers[HttpResponseHeader.Location];
181 }
182 set
183 {
185 if (string.IsNullOrEmpty(value))
186 {
187 Headers.Remove("Location");
188 }
189 else
190 {
191 Headers.Set("Location", value);
192 }
193 }
194 }
195
196 public string StatusDescription
197 {
198 get
199 {
200 if (_statusDescription == null)
201 {
203 }
204 if (_statusDescription == null)
205 {
206 _statusDescription = string.Empty;
207 }
208 return _statusDescription;
209 }
210 set
211 {
213 if (value == null)
214 {
215 throw new ArgumentNullException("value");
216 }
217 for (int i = 0; i < value.Length; i++)
218 {
219 char c = (char)(0xFFu & value[i]);
220 if ((c <= '\u001f' && c != '\t') || c == '\u007f')
221 {
223 }
224 }
226 }
227 }
228
229 public int StatusCode
230 {
231 get
232 {
233 return _nativeResponse.StatusCode;
234 }
235 set
236 {
239 {
241 }
242 _nativeResponse.StatusCode = (ushort)value;
243 }
244 }
245
247 {
248 get
249 {
250 return new Version(_nativeResponse.Version.MajorVersion, _nativeResponse.Version.MinorVersion);
251 }
252 set
253 {
255 if (value == null)
256 {
257 throw new ArgumentNullException("value");
258 }
259 if (value.Major != 1 || (value.Minor != 0 && value.Minor != 1))
260 {
261 throw new ArgumentException(System.SR.net_wrongversion, "value");
262 }
263 _nativeResponse.Version.MajorVersion = (ushort)value.Major;
264 _nativeResponse.Version.MinorVersion = (ushort)value.Minor;
265 }
266 }
267
269
270 internal bool ComputedHeaders => _responseState >= ResponseState.ComputedHeaders;
271
272 internal bool SentHeaders => _responseState >= ResponseState.SentHeaders;
273
274 private bool Disposed => _responseState >= ResponseState.Closed;
275
276 private static bool CanSendResponseBody(int responseCode)
277 {
278 for (int i = 0; i < s_noResponseBody.Length; i++)
279 {
281 {
282 return false;
283 }
284 }
285 return true;
286 }
287
288 public void AddHeader(string name, string value)
289 {
290 if (System.Net.NetEventSource.Log.IsEnabled())
291 {
292 System.Net.NetEventSource.Info(this, $"name={name}, value={value}", "AddHeader");
293 }
294 Headers.Set(name, value);
295 }
296
297 public void AppendHeader(string name, string value)
298 {
299 if (System.Net.NetEventSource.Log.IsEnabled())
300 {
301 System.Net.NetEventSource.Info(this, $"name={name}, value={value}", "AppendHeader");
302 }
303 Headers.Add(name, value);
304 }
305
307 {
308 if (cookie == null)
309 {
310 throw new ArgumentNullException("cookie");
311 }
312 if (System.Net.NetEventSource.Log.IsEnabled())
313 {
314 System.Net.NetEventSource.Info(this, $"cookie: {cookie}", "AppendCookie");
315 }
317 }
318
319 private void ComputeCookies()
320 {
321 if (System.Net.NetEventSource.Log.IsEnabled())
322 {
323 System.Net.NetEventSource.Info(this, FormattableStringFactory.Create("Entering Set-Cookie: {0}, Set-Cookie2: {1}", Headers[HttpResponseHeader.SetCookie], Headers["Set-Cookie2"]), "ComputeCookies");
324 }
325 if (_cookies != null)
326 {
327 string text = null;
328 string text2 = null;
329 for (int i = 0; i < _cookies.Count; i++)
330 {
332 string text3 = cookie.ToServerString();
333 if (text3 != null && text3.Length != 0)
334 {
335 if (System.Net.NetEventSource.Log.IsEnabled())
336 {
337 System.Net.NetEventSource.Info(this, $"Now looking at index:{i} cookie: {cookie}", "ComputeCookies");
338 }
339 if (cookie.IsRfc2965Variant())
340 {
341 text = ((text == null) ? text3 : (text + ", " + text3));
342 }
343 else
344 {
345 text2 = ((text2 == null) ? text3 : (text2 + ", " + text3));
346 }
347 }
348 }
349 if (!string.IsNullOrEmpty(text2))
350 {
351 Headers.Set("Set-Cookie", text2);
352 if (string.IsNullOrEmpty(text))
353 {
354 Headers.Remove("Set-Cookie2");
355 }
356 }
357 if (!string.IsNullOrEmpty(text))
358 {
359 Headers.Set("Set-Cookie2", text);
360 if (string.IsNullOrEmpty(text2))
361 {
362 Headers.Remove("Set-Cookie");
363 }
364 }
365 }
366 if (System.Net.NetEventSource.Log.IsEnabled())
367 {
368 System.Net.NetEventSource.Info(this, FormattableStringFactory.Create("Exiting Set-Cookie: {0} Set-Cookie2: {1}", Headers[HttpResponseHeader.SetCookie], Headers["Set-Cookie2"]), "ComputeCookies");
369 }
370 }
371
372 public void Redirect(string url)
373 {
374 if (System.Net.NetEventSource.Log.IsEnabled())
375 {
376 System.Net.NetEventSource.Info(this, $"url={url}", "Redirect");
377 }
378 Headers[HttpResponseHeader.Location] = url;
379 StatusCode = 302;
381 }
382
384 {
385 if (cookie == null)
386 {
387 throw new ArgumentNullException("cookie");
388 }
389 Cookie cookie2 = cookie.Clone();
390 int num = Cookies.InternalAdd(cookie2, isStrict: true);
391 if (System.Net.NetEventSource.Log.IsEnabled())
392 {
393 System.Net.NetEventSource.Info(this, $"cookie: {cookie}", "SetCookie");
394 }
395 if (num != 1)
396 {
397 throw new ArgumentException(System.SR.net_cookie_exists, "cookie");
398 }
399 }
400
402 {
403 Dispose();
404 }
405
406 private void CheckDisposed()
407 {
408 if (Disposed)
409 {
410 throw new ObjectDisposedException(GetType().FullName);
411 }
412 }
413
414 private void CheckSentHeaders()
415 {
416 if (SentHeaders)
417 {
419 }
420 }
421
423 {
424 if (System.Net.NetEventSource.Log.IsEnabled())
425 {
426 System.Net.NetEventSource.Info(this, null, ".ctor");
427 }
428 _nativeResponse = default(global::Interop.HttpApi.HTTP_RESPONSE);
429 _nativeResponse.StatusCode = 200;
430 _nativeResponse.Version.MajorVersion = 1;
431 _nativeResponse.Version.MinorVersion = 1;
433 }
434
436 : this()
437 {
438 if (System.Net.NetEventSource.Log.IsEnabled())
439 {
441 }
443 }
444
446 {
447 if (System.Net.NetEventSource.Log.IsEnabled())
448 {
449 System.Net.NetEventSource.Info(this, $"templateResponse {templateResponse}", "CopyFrom");
450 }
451 _nativeResponse = default(global::Interop.HttpApi.HTTP_RESPONSE);
453 _webHeaders = templateResponse._webHeaders;
454 _boundaryType = templateResponse._boundaryType;
455 _contentLength = templateResponse._contentLength;
456 _nativeResponse.StatusCode = templateResponse._nativeResponse.StatusCode;
457 _nativeResponse.Version.MajorVersion = templateResponse._nativeResponse.Version.MajorVersion;
458 _nativeResponse.Version.MinorVersion = templateResponse._nativeResponse.Version.MinorVersion;
459 _statusDescription = templateResponse._statusDescription;
460 _keepAlive = templateResponse._keepAlive;
461 }
462
463 public void Abort()
464 {
465 if (!Disposed)
466 {
469 }
470 }
471
472 public void Close()
473 {
474 if (System.Net.NetEventSource.Log.IsEnabled())
475 {
476 System.Net.NetEventSource.Info(this, null, "Close");
477 }
478 ((IDisposable)this).Dispose();
479 }
480
481 public void Close(byte[] responseEntity, bool willBlock)
482 {
484 if (responseEntity == null)
485 {
486 throw new ArgumentNullException("responseEntity");
487 }
488 if (System.Net.NetEventSource.Log.IsEnabled())
489 {
490 System.Net.NetEventSource.Info(this, $"ResponseState:{_responseState}, BoundaryType:{_boundaryType}, ContentLength:{_contentLength}", "Close");
491 }
492 if (!SentHeaders && _boundaryType != BoundaryType.Chunked)
493 {
495 }
497 if (willBlock)
498 {
499 try
500 {
502 return;
503 }
504 catch (Win32Exception)
505 {
506 return;
507 }
508 finally
509 {
513 }
514 }
516 }
517
518 private void Dispose()
519 {
520 if (!Disposed)
521 {
526 }
527 }
528
529 private void EnsureResponseStream()
530 {
531 if (_responseStream == null)
532 {
534 }
535 }
536
538 {
539 try
540 {
542 }
543 catch (Win32Exception)
544 {
545 }
546 finally
547 {
551 }
552 }
553
554 internal unsafe uint SendHeaders(global::Interop.HttpApi.HTTP_DATA_CHUNK* pDataChunk, HttpResponseStreamAsyncResult asyncResult, global::Interop.HttpApi.HTTP_FLAGS flags, bool isWebSocketHandshake)
555 {
556 if (System.Net.NetEventSource.Log.IsEnabled())
557 {
558 System.Net.NetEventSource.Info(this, $"pDataChunk: {(IntPtr)pDataChunk}, asyncResult: {asyncResult}", "SendHeaders");
559 }
560 if (StatusCode == 401)
561 {
563 }
564 if (System.Net.NetEventSource.Log.IsEnabled())
565 {
566 StringBuilder stringBuilder = new StringBuilder("HttpListenerResponse Headers:\n");
567 for (int i = 0; i < Headers.Count; i++)
568 {
569 stringBuilder.Append('\t');
570 stringBuilder.Append(Headers.GetKey(i));
571 stringBuilder.Append(" : ");
572 stringBuilder.Append(Headers.Get(i));
573 stringBuilder.Append('\n');
574 }
575 if (System.Net.NetEventSource.Log.IsEnabled())
576 {
577 System.Net.NetEventSource.Info(this, stringBuilder.ToString(), "SendHeaders");
578 }
579 }
580 _responseState = ResponseState.SentHeaders;
582 uint num;
583 try
584 {
585 if (pDataChunk != null)
586 {
587 _nativeResponse.EntityChunkCount = 1;
588 _nativeResponse.pEntityChunks = pDataChunk;
589 }
590 else if (asyncResult != null && asyncResult.pDataChunks != null)
591 {
592 _nativeResponse.EntityChunkCount = asyncResult.dataChunkCount;
593 _nativeResponse.pEntityChunks = asyncResult.pDataChunks;
594 }
595 else
596 {
597 _nativeResponse.EntityChunkCount = 0;
598 _nativeResponse.pEntityChunks = null;
599 }
600 if (System.Net.NetEventSource.Log.IsEnabled())
601 {
602 System.Net.NetEventSource.Info(this, "Calling Interop.HttpApi.HttpSendHttpResponse flags:" + flags, "SendHeaders");
603 }
604 Unsafe.SkipInit(out uint numBytes);
605 if (StatusDescription.Length > 0)
606 {
608 fixed (byte* pReason = &array[0])
609 {
610 _nativeResponse.ReasonLength = (ushort)array.Length;
612 _nativeResponse.pReason = (sbyte*)pReason;
613 fixed (global::Interop.HttpApi.HTTP_RESPONSE* pHttpResponse = &_nativeResponse)
614 {
615 num = global::Interop.HttpApi.HttpSendHttpResponse(HttpListenerContext.RequestQueueHandle, HttpListenerRequest.RequestId, (uint)flags, pHttpResponse, null, &numBytes, Microsoft.Win32.SafeHandles.SafeLocalAllocHandle.Zero, 0u, (asyncResult == null) ? null : asyncResult._pOverlapped, null);
616 if (asyncResult != null && num == 0 && HttpListener.SkipIOCPCallbackOnSuccess)
617 {
618 asyncResult.IOCompleted(num, numBytes);
619 }
620 }
621 }
622 }
623 else
624 {
625 fixed (global::Interop.HttpApi.HTTP_RESPONSE* pHttpResponse2 = &_nativeResponse)
626 {
627 num = global::Interop.HttpApi.HttpSendHttpResponse(HttpListenerContext.RequestQueueHandle, HttpListenerRequest.RequestId, (uint)flags, pHttpResponse2, null, &numBytes, Microsoft.Win32.SafeHandles.SafeLocalAllocHandle.Zero, 0u, (asyncResult == null) ? null : asyncResult._pOverlapped, null);
628 if (asyncResult != null && num == 0 && HttpListener.SkipIOCPCallbackOnSuccess)
629 {
630 asyncResult.IOCompleted(num, numBytes);
631 }
632 }
633 }
634 if (System.Net.NetEventSource.Log.IsEnabled())
635 {
636 System.Net.NetEventSource.Info(this, "Call to Interop.HttpApi.HttpSendHttpResponse returned:" + num, "SendHeaders");
637 }
638 }
639 finally
640 {
642 }
643 return num;
644 }
645
646 internal global::Interop.HttpApi.HTTP_FLAGS ComputeHeaders()
647 {
648 global::Interop.HttpApi.HTTP_FLAGS hTTP_FLAGS = global::Interop.HttpApi.HTTP_FLAGS.NONE;
649 if (System.Net.NetEventSource.Log.IsEnabled())
650 {
651 System.Net.NetEventSource.Info(this, null, "ComputeHeaders");
652 }
653 _responseState = ResponseState.ComputedHeaders;
655 if (System.Net.NetEventSource.Log.IsEnabled())
656 {
657 System.Net.NetEventSource.Info(this, $"flags: {hTTP_FLAGS} _boundaryType: {_boundaryType} _contentLength: {_contentLength} _keepAlive: {_keepAlive}", "ComputeHeaders");
658 }
659 if (_boundaryType == BoundaryType.None)
660 {
662 {
663 _keepAlive = false;
664 }
665 else
666 {
667 _boundaryType = BoundaryType.Chunked;
668 }
670 {
671 _contentLength = -1L;
672 }
673 else
674 {
676 }
677 }
678 if (System.Net.NetEventSource.Log.IsEnabled())
679 {
680 System.Net.NetEventSource.Info(this, $"flags:{hTTP_FLAGS} _BoundaryType:{_boundaryType} _contentLength:{_contentLength} _keepAlive: {_keepAlive}", "ComputeHeaders");
681 }
682 if (_boundaryType == BoundaryType.ContentLength)
683 {
684 Headers[HttpResponseHeader.ContentLength] = _contentLength.ToString("D", NumberFormatInfo.InvariantInfo);
685 if (_contentLength == 0L)
686 {
687 hTTP_FLAGS = global::Interop.HttpApi.HTTP_FLAGS.NONE;
688 }
689 }
690 else if (_boundaryType == BoundaryType.Chunked)
691 {
692 Headers[HttpResponseHeader.TransferEncoding] = "chunked";
693 }
694 else if (_boundaryType == BoundaryType.None)
695 {
696 hTTP_FLAGS = global::Interop.HttpApi.HTTP_FLAGS.NONE;
697 }
698 else
699 {
700 _keepAlive = false;
701 }
702 if (!_keepAlive)
703 {
704 Headers.Add(HttpResponseHeader.Connection, "close");
705 if (hTTP_FLAGS == global::Interop.HttpApi.HTTP_FLAGS.NONE)
706 {
707 hTTP_FLAGS = global::Interop.HttpApi.HTTP_FLAGS.HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY;
708 }
709 }
711 {
712 Headers[HttpResponseHeader.KeepAlive] = "true";
713 }
714 if (System.Net.NetEventSource.Log.IsEnabled())
715 {
716 System.Net.NetEventSource.Info(this, $"flags:{hTTP_FLAGS} _BoundaryType:{_boundaryType} _contentLength:{_contentLength} _keepAlive: {_keepAlive}", "ComputeHeaders");
717 }
718 return hTTP_FLAGS;
719 }
720
721 internal void ComputeCoreHeaders()
722 {
724 {
726 }
728 }
729
730 private unsafe List<GCHandle> SerializeHeaders(ref global::Interop.HttpApi.HTTP_RESPONSE_HEADERS headers, bool isWebSocketHandshake)
731 {
732 global::Interop.HttpApi.HTTP_UNKNOWN_HEADER[] array = null;
733 if (System.Net.NetEventSource.Log.IsEnabled())
734 {
735 System.Net.NetEventSource.Info(this, "SerializeHeaders(HTTP_RESPONSE_HEADERS)", "SerializeHeaders");
736 }
737 if (Headers.Count == 0)
738 {
739 return null;
740 }
741 byte[] array2 = null;
743 int num = 0;
744 for (int i = 0; i < Headers.Count; i++)
745 {
746 string key = Headers.GetKey(i);
747 int num2 = global::Interop.HttpApi.HTTP_RESPONSE_HEADER_ID.IndexOfKnownHeader(key);
748 if (num2 == 27 || (isWebSocketHandshake && num2 == 1))
749 {
750 num2 = -1;
751 }
752 if (num2 == -1)
753 {
754 string[] values = Headers.GetValues(i);
755 num += values.Length;
756 }
757 }
758 try
759 {
760 fixed (global::Interop.HttpApi.HTTP_KNOWN_HEADER* ptr = &headers.KnownHeaders)
761 {
762 for (int j = 0; j < Headers.Count; j++)
763 {
764 string key = Headers.GetKey(j);
765 string text = Headers.Get(j);
766 int num2 = global::Interop.HttpApi.HTTP_RESPONSE_HEADER_ID.IndexOfKnownHeader(key);
767 if (num2 == 27 || (isWebSocketHandshake && num2 == 1))
768 {
769 num2 = -1;
770 }
771 if (System.Net.NetEventSource.Log.IsEnabled())
772 {
773 System.Net.NetEventSource.Info(this, $"index={j},headers.count={Headers.Count},headerName:{key},lookup:{num2} headerValue:{text}", "SerializeHeaders");
774 }
775 if (num2 == -1)
776 {
777 if (array == null)
778 {
779 array = new global::Interop.HttpApi.HTTP_UNKNOWN_HEADER[num];
781 list.Add(item);
782 headers.pUnknownHeaders = (global::Interop.HttpApi.HTTP_UNKNOWN_HEADER*)(void*)item.AddrOfPinnedObject();
783 }
784 string[] values2 = Headers.GetValues(j);
785 for (int k = 0; k < values2.Length; k++)
786 {
788 array[headers.UnknownHeaderCount].NameLength = (ushort)array2.Length;
791 list.Add(item);
792 array[headers.UnknownHeaderCount].pName = (sbyte*)(void*)item.AddrOfPinnedObject();
793 text = values2[k];
795 array[headers.UnknownHeaderCount].RawValueLength = (ushort)array2.Length;
798 list.Add(item);
799 array[headers.UnknownHeaderCount].pRawValue = (sbyte*)(void*)item.AddrOfPinnedObject();
800 headers.UnknownHeaderCount++;
801 if (System.Net.NetEventSource.Log.IsEnabled())
802 {
803 System.Net.NetEventSource.Info(this, "UnknownHeaderCount:" + headers.UnknownHeaderCount, "SerializeHeaders");
804 }
805 }
806 continue;
807 }
808 if (System.Net.NetEventSource.Log.IsEnabled())
809 {
810 System.Net.NetEventSource.Info(this, $"HttpResponseHeader[{num2}]:{(HttpResponseHeader)num2} headerValue:{text}", "SerializeHeaders");
811 }
812 if (text != null)
813 {
815 ptr[num2].RawValueLength = (ushort)array2.Length;
818 list.Add(item);
819 ptr[num2].pRawValue = (sbyte*)(void*)item.AddrOfPinnedObject();
820 if (System.Net.NetEventSource.Log.IsEnabled())
821 {
822 System.Net.NetEventSource.Info(this, $"pRawValue:{(IntPtr)ptr[num2].pRawValue} RawValueLength:{ptr[num2].RawValueLength} lookup: {num2}", "SerializeHeaders");
823 }
824 }
825 }
826 return list;
827 }
828 }
829 catch
830 {
832 throw;
833 }
834 }
835
837 {
838 if (pinnedHeaders == null)
839 {
840 return;
841 }
843 {
844 if (pinnedHeader.IsAllocated)
845 {
846 pinnedHeader.Free();
847 }
848 }
849 }
850
855}
static readonly Microsoft.Win32.SafeHandles.SafeLocalAllocHandle Zero
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
virtual void Close()
Definition Stream.cs:644
int InternalAdd(Cookie cookie, bool isStrict)
void CopyFrom(HttpListenerResponse templateResponse)
static bool CanSendResponseBody(int responseCode)
void FreePinnedHeaders(List< GCHandle > pinnedHeaders)
void NonBlockingCloseCallback(IAsyncResult asyncResult)
readonly HttpListenerContext _httpContext
void Close(byte[] responseEntity, bool willBlock)
global::Interop.HttpApi.HTTP_FLAGS ComputeHeaders()
void AddHeader(string name, string value)
HttpListenerResponse(HttpListenerContext httpContext)
void AppendHeader(string name, string value)
global::Interop.HttpApi.HTTP_RESPONSE _nativeResponse
void CancelLastWrite(SafeHandle requestQueueHandle)
unsafe uint SendHeaders(global::Interop.HttpApi.HTTP_DATA_CHUNK *pDataChunk, HttpResponseStreamAsyncResult asyncResult, global::Interop.HttpApi.HTTP_FLAGS flags, bool isWebSocketHandshake)
unsafe List< GCHandle > SerializeHeaders(ref global::Interop.HttpApi.HTTP_RESPONSE_HEADERS headers, bool isWebSocketHandshake)
static readonly bool SkipIOCPCallbackOnSuccess
override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
override void Write(byte[] buffer, int offset, int count)
unsafe void CancelLastWrite(SafeHandle requestQueueHandle)
override void EndWrite(IAsyncResult asyncResult)
static string Get(HttpStatusCode code)
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void Associate(object first, object second, [CallerMemberName] string memberName=null)
void Add(HttpRequestHeader header, string? value)
static unsafe void GetBytes(string myString, int charIndex, int charCount, byte[] bytes, int byteIndex)
static int GetByteCount(string myString)
static FormattableString Create(string format, params object?[] arguments)
static string net_invalidstatus
Definition SR.cs:100
static string net_cookie_exists
Definition SR.cs:108
static string net_clsmall
Definition SR.cs:110
static string net_rspsubmitted
Definition SR.cs:104
static string net_WebHeaderInvalidControlChars
Definition SR.cs:102
static string net_nochunkuploadonhttp10
Definition SR.cs:106
static string net_wrongversion
Definition SR.cs:112
Definition SR.cs:7
static GCHandle Alloc(object? value)
Definition GCHandle.cs:81