Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MediaTypeWithQualityHeaderValue.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
3
namespace
System.Net.Http.Headers
;
4
5
public
sealed
class
MediaTypeWithQualityHeaderValue
:
MediaTypeHeaderValue
,
ICloneable
6
{
7
public
double
?
Quality
8
{
9
get
10
{
11
return
HeaderUtilities
.
GetQuality
((
ObjectCollection<NameValueHeaderValue>
)base.Parameters);
12
}
13
set
14
{
15
HeaderUtilities
.
SetQuality
((
ObjectCollection<NameValueHeaderValue>
)base.Parameters,
value
);
16
}
17
}
18
19
internal
MediaTypeWithQualityHeaderValue
()
20
{
21
}
22
23
public
MediaTypeWithQualityHeaderValue
(
string
mediaType)
24
: base(mediaType)
25
{
26
}
27
28
public
MediaTypeWithQualityHeaderValue
(
string
mediaType,
double
quality)
29
: base(mediaType)
30
{
31
Quality
= quality;
32
}
33
34
private
MediaTypeWithQualityHeaderValue
(
MediaTypeWithQualityHeaderValue
source
)
35
: base(
source
)
36
{
37
}
38
39
object
ICloneable
.
Clone
()
40
{
41
return
new
MediaTypeWithQualityHeaderValue
(
this
);
42
}
43
44
public
new
static
MediaTypeWithQualityHeaderValue
Parse
(
string
?
input
)
45
{
46
int
index
= 0;
47
return
(
MediaTypeWithQualityHeaderValue
)
MediaTypeHeaderParser
.
SingleValueWithQualityParser
.ParseValue(
input
,
null
, ref
index
);
48
}
49
50
public
static
bool
TryParse
([NotNullWhen(
true
)]
string
?
input
, [NotNullWhen(
true
)] out
MediaTypeWithQualityHeaderValue
? parsedValue)
51
{
52
int
index
= 0;
53
parsedValue =
null
;
54
if
(
MediaTypeHeaderParser
.
SingleValueWithQualityParser
.TryParseValue(
input
,
null
, ref
index
, out var parsedValue2))
55
{
56
parsedValue = (
MediaTypeWithQualityHeaderValue
)parsedValue2;
57
return
true
;
58
}
59
return
false
;
60
}
61
}
System.Net.Http.Headers.HeaderUtilities.SetQuality
static void SetQuality(ObjectCollection< NameValueHeaderValue > parameters, double? value)
Definition
HeaderUtilities.cs:16
System.Net.Http.Headers.HeaderUtilities.GetQuality
static ? double GetQuality(ObjectCollection< NameValueHeaderValue > parameters)
Definition
HeaderUtilities.cs:87
System.Net.Http.Headers.HeaderUtilities
Definition
HeaderUtilities.cs:9
System.Net.Http.Headers.MediaTypeHeaderParser.SingleValueWithQualityParser
static readonly MediaTypeHeaderParser SingleValueWithQualityParser
Definition
MediaTypeHeaderParser.cs:9
System.Net.Http.Headers.MediaTypeHeaderParser
Definition
MediaTypeHeaderParser.cs:4
System.Net.Http.Headers.MediaTypeHeaderValue
Definition
MediaTypeHeaderValue.cs:9
System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.MediaTypeWithQualityHeaderValue
MediaTypeWithQualityHeaderValue()
Definition
MediaTypeWithQualityHeaderValue.cs:19
System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.MediaTypeWithQualityHeaderValue
MediaTypeWithQualityHeaderValue(MediaTypeWithQualityHeaderValue source)
Definition
MediaTypeWithQualityHeaderValue.cs:34
System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.MediaTypeWithQualityHeaderValue
MediaTypeWithQualityHeaderValue(string mediaType)
Definition
MediaTypeWithQualityHeaderValue.cs:23
System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.MediaTypeWithQualityHeaderValue
MediaTypeWithQualityHeaderValue(string mediaType, double quality)
Definition
MediaTypeWithQualityHeaderValue.cs:28
System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.TryParse
static bool TryParse([NotNullWhen(true)] string? input, [NotNullWhen(true)] out MediaTypeWithQualityHeaderValue? parsedValue)
Definition
MediaTypeWithQualityHeaderValue.cs:50
System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Quality
double? Quality
Definition
MediaTypeWithQualityHeaderValue.cs:8
System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse
static new MediaTypeWithQualityHeaderValue Parse(string? input)
Definition
MediaTypeWithQualityHeaderValue.cs:44
System.Net.Http.Headers.MediaTypeWithQualityHeaderValue
Definition
MediaTypeWithQualityHeaderValue.cs:6
System.Net.Http.Headers.ObjectCollection
Definition
ObjectCollection.cs:10
System.ICloneable.Clone
object Clone()
System.ICloneable
Definition
ICloneable.cs:4
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Net.Http.Headers
Definition
AltSvcHeaderParser.cs:4
System.ExceptionArgument.value
@ value
System.ExceptionArgument.source
@ source
System.ExceptionArgument.index
@ index
System.ExceptionArgument.input
@ input
source
System.Net.Http
System.Net.Http.Headers
MediaTypeWithQualityHeaderValue.cs
Generated by
1.10.0