Improve this Doc
View Source
Class BitmapSourceHttpContentConverter
This can convert HttpContent from/to a WPF BitmapImage
Inheritance
System.Object
BitmapSourceHttpContentConverter
Namespace:Dapplo.HttpExtensions.ContentConverter
Assembly:Dapplo.HttpExtensions.dll
Syntax
public class BitmapSourceHttpContentConverter : IHttpContentConverter
Fields
|
Improve this Doc
View Source
Instance
Declaration
public static readonly BitmapSourceHttpContentConverter Instance
Properties
|
Improve this Doc
View Source
Format
Declaration
public ImageFormat Format { get; set; }
Returns
Type |
Description |
System.Drawing.Imaging.ImageFormat |
|
|
Improve this Doc
View Source
Order
Declaration
public int Order { get; }
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Quality
Declaration
public int Quality { get; set; }
Returns
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
Declaration
public void AddAcceptHeadersForType(Type resultType, HttpRequestMessage httpRequestMessage)
Parameters
Type |
Name |
Description |
System.Type |
resultType |
|
System.Net.Http.HttpRequestMessage |
httpRequestMessage |
|
|
Improve this Doc
View Source
CanConvertFromHttpContent(Type, HttpContent)
This checks if the HttpContent can be converted to a Bitmap and is assignable to the specified Type
Declaration
public bool CanConvertFromHttpContent(Type typeToConvertTo, HttpContent httpContent)
Parameters
Type |
Name |
Description |
System.Type |
typeToConvertTo |
This should be something we can assign Bitmap to
|
System.Net.Http.HttpContent |
httpContent |
HttpContent to process
|
Returns
Type |
Description |
System.Boolean |
true if it can convert
|
|
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 |
|