@@ -22,23 +22,23 @@ public sealed class JsonApiMediaType : IEquatable<JsonApiMediaType>
22
22
/// <summary>
23
23
/// Gets the JSON:API media type with the "https://jsonapi.org/ext/atomic" extension.
24
24
/// </summary>
25
- public static readonly JsonApiMediaType AtomicOperations = new ( [ JsonApiExtension . AtomicOperations ] ) ;
25
+ public static readonly JsonApiMediaType AtomicOperations = new ( [ JsonApiMediaTypeExtension . AtomicOperations ] ) ;
26
26
27
27
/// <summary>
28
28
/// Gets the JSON:API media type with the "atomic-operations" extension.
29
29
/// </summary>
30
- public static readonly JsonApiMediaType RelaxedAtomicOperations = new ( [ JsonApiExtension . RelaxedAtomicOperations ] ) ;
30
+ public static readonly JsonApiMediaType RelaxedAtomicOperations = new ( [ JsonApiMediaTypeExtension . RelaxedAtomicOperations ] ) ;
31
31
32
- public IReadOnlySet < JsonApiExtension > Extensions { get ; }
32
+ public IReadOnlySet < JsonApiMediaTypeExtension > Extensions { get ; }
33
33
34
- public JsonApiMediaType ( IReadOnlySet < JsonApiExtension > extensions )
34
+ public JsonApiMediaType ( IReadOnlySet < JsonApiMediaTypeExtension > extensions )
35
35
{
36
36
ArgumentGuard . NotNull ( extensions ) ;
37
37
38
38
Extensions = extensions ;
39
39
}
40
40
41
- public JsonApiMediaType ( IEnumerable < JsonApiExtension > extensions )
41
+ public JsonApiMediaType ( IEnumerable < JsonApiMediaTypeExtension > extensions )
42
42
{
43
43
ArgumentGuard . NotNull ( extensions ) ;
44
44
@@ -69,7 +69,7 @@ private static (JsonApiMediaType MediaType, decimal QualityFactor)? TryParse(str
69
69
70
70
if ( isBaseMatch )
71
71
{
72
- HashSet < JsonApiExtension > extensions = [ ] ;
72
+ HashSet < JsonApiMediaTypeExtension > extensions = [ ] ;
73
73
74
74
decimal qualityFactor = 1.0m ;
75
75
@@ -97,13 +97,13 @@ private static (JsonApiMediaType MediaType, decimal QualityFactor)? TryParse(str
97
97
return null ;
98
98
}
99
99
100
- private static void ParseExtensions ( NameValueHeaderValue parameter , HashSet < JsonApiExtension > extensions )
100
+ private static void ParseExtensions ( NameValueHeaderValue parameter , HashSet < JsonApiMediaTypeExtension > extensions )
101
101
{
102
102
string parameterValue = parameter . GetUnescapedValue ( ) . ToString ( ) ;
103
103
104
104
foreach ( string extValue in parameterValue . Split ( ' ' , StringSplitOptions . RemoveEmptyEntries | StringSplitOptions . TrimEntries ) )
105
105
{
106
- var extension = new JsonApiExtension ( extValue ) ;
106
+ var extension = new JsonApiMediaTypeExtension ( extValue ) ;
107
107
extensions . Add ( extension ) ;
108
108
}
109
109
}
@@ -114,7 +114,7 @@ public override string ToString()
114
114
List < NameValueHeaderValue > parameters = [ ] ;
115
115
bool requiresEscape = false ;
116
116
117
- foreach ( JsonApiExtension extension in Extensions )
117
+ foreach ( JsonApiMediaTypeExtension extension in Extensions )
118
118
{
119
119
var extHeaderValue = new NameValueHeaderValue ( ExtSegment ) ;
120
120
extHeaderValue . SetAndEscapeValue ( extension . UnescapedValue ) ;
@@ -178,7 +178,7 @@ public override int GetHashCode()
178
178
{
179
179
int hashCode = 0 ;
180
180
181
- foreach ( JsonApiExtension extension in Extensions )
181
+ foreach ( JsonApiMediaTypeExtension extension in Extensions )
182
182
{
183
183
hashCode = HashCode . Combine ( hashCode , extension ) ;
184
184
}
0 commit comments