forked from aspnet/AspNetWebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMockContentNegotiator.cs
More file actions
77 lines (63 loc) · 3.02 KB
/
Copy pathMockContentNegotiator.cs
File metadata and controls
77 lines (63 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Net.Http.Headers;
using System.Text;
namespace System.Net.Http.Formatting.Mocks
{
public class MockContentNegotiator : DefaultContentNegotiator
{
public MockContentNegotiator()
{
}
public MockContentNegotiator(bool excludeMatchOnTypeOnly)
: base(excludeMatchOnTypeOnly)
{
}
public new Collection<MediaTypeFormatterMatch> ComputeFormatterMatches(Type type, HttpRequestMessage request, IEnumerable<MediaTypeFormatter> formatters)
{
return base.ComputeFormatterMatches(type, request, formatters);
}
public new MediaTypeFormatterMatch SelectResponseMediaTypeFormatter(ICollection<MediaTypeFormatterMatch> matches)
{
return base.SelectResponseMediaTypeFormatter(matches);
}
public new Encoding SelectResponseCharacterEncoding(HttpRequestMessage request, MediaTypeFormatter formatter)
{
return base.SelectResponseCharacterEncoding(request, formatter);
}
public new MediaTypeFormatterMatch MatchMediaTypeMapping(HttpRequestMessage request, MediaTypeFormatter formatter)
{
return base.MatchMediaTypeMapping(request, formatter);
}
public new MediaTypeFormatterMatch MatchAcceptHeader(IEnumerable<MediaTypeWithQualityHeaderValue> sortedAcceptValues, MediaTypeFormatter formatter)
{
return base.MatchAcceptHeader(sortedAcceptValues, formatter);
}
public new MediaTypeFormatterMatch MatchRequestMediaType(HttpRequestMessage request, MediaTypeFormatter formatter)
{
return base.MatchRequestMediaType(request, formatter);
}
public new bool ShouldMatchOnType(IEnumerable<MediaTypeWithQualityHeaderValue> sortedAcceptValues)
{
return base.ShouldMatchOnType(sortedAcceptValues);
}
public new MediaTypeFormatterMatch MatchType(Type type, MediaTypeFormatter formatter)
{
return base.MatchType(type, formatter);
}
public new IEnumerable<MediaTypeWithQualityHeaderValue> SortMediaTypeWithQualityHeaderValuesByQFactor(ICollection<MediaTypeWithQualityHeaderValue> headerValues)
{
return base.SortMediaTypeWithQualityHeaderValuesByQFactor(headerValues);
}
public new IEnumerable<StringWithQualityHeaderValue> SortStringWithQualityHeaderValuesByQFactor(ICollection<StringWithQualityHeaderValue> headerValues)
{
return base.SortStringWithQualityHeaderValuesByQFactor(headerValues);
}
public new MediaTypeFormatterMatch UpdateBestMatch(MediaTypeFormatterMatch current, MediaTypeFormatterMatch potentialReplacement)
{
return base.UpdateBestMatch(current, potentialReplacement);
}
}
}