Improve this Doc
View Source
Class SyndicationFeedHttpContentConverter
This can convert HttpContent from/to a SyndicationFeed
Inheritance
System.Object
SyndicationFeedHttpContentConverter
Namespace:Dapplo.HttpExtensions.ContentConverter
Assembly:Dapplo.HttpExtensions.dll
Syntax
public class SyndicationFeedHttpContentConverter : IHttpContentConverter
Fields
|
Improve this Doc
View Source
Instance
Declaration
public static readonly SyndicationFeedHttpContentConverter Instance
Properties
|
Improve this Doc
View Source
Order
Declaration
public int Order { get; }
Returns
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
Add Accept-Headers to the HttpRequestMessage, depending on the passt resultType.
This tries to hint the Http server what we can accept, which depends on the type of the return value
Declaration
public void AddAcceptHeadersForType(Type resultType, HttpRequestMessage httpRequestMessage)
Parameters
Type |
Name |
Description |
System.Type |
resultType |
Result type, this where to a conversion from HttpContent is made
|
System.Net.Http.HttpRequestMessage |
httpRequestMessage |
HttpRequestMessage
|
|
Improve this Doc
View Source
CanConvertFromHttpContent(Type, HttpContent)
Declaration
public bool CanConvertFromHttpContent(Type typeToConvertTo, HttpContent httpContent)
Parameters
Type |
Name |
Description |
System.Type |
typeToConvertTo |
|
System.Net.Http.HttpContent |
httpContent |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CanConvertToHttpContent(Type, Object)
Declaration
public bool CanConvertToHttpContent(Type typeToConvert, object content)
Parameters
Type |
Name |
Description |
System.Type |
typeToConvert |
|
System.Object |
content |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ConvertFromHttpContentAsync(Type, HttpContent, CancellationToken)
Declaration
public Task<object> ConvertFromHttpContentAsync(Type resultType, HttpContent httpContent, CancellationToken token = null)
Parameters
Type |
Name |
Description |
System.Type |
resultType |
|
System.Net.Http.HttpContent |
httpContent |
|
System.Threading.CancellationToken |
token |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Object> |
|
|
Improve this Doc
View Source
ConvertToHttpContent(Type, Object)
Declaration
public HttpContent ConvertToHttpContent(Type typeToConvert, object content)
Parameters
Type |
Name |
Description |
System.Type |
typeToConvert |
|
System.Object |
content |
|
Returns
Type |
Description |
System.Net.Http.HttpContent |
|