• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Dapplo.HttpExtensions
    • AuthorizationExtensions
    • HttpBehaviour
    • HttpBehaviourExtensions
    • HttpClientExtensions
    • HttpContentExtensions
    • HttpExtensionsGlobals
    • HttpRequestMessageConfiguration
    • HttpRequestMessageExtensions
    • HttpResponse
    • HttpResponse<TResponse, TErrorResponse>
    • HttpResponse<TResponse>
    • HttpResponseMessageExtensions
    • HttpResponseWithError<TErrorResponse>
    • IChangeableHttpBehaviour
    • IHttpBehaviour
    • IHttpContentConverter
    • IHttpRequestConfiguration
    • IHttpSettings
    • IJsonSerializer
    • MiscExtensions
    • UriActionExtensions
    • UriModifyExtensions
    • UriParseExtensions
  • Dapplo.HttpExtensions.ContentConverter
    • ByteArrayHttpContentConverter
    • DefaultJsonHttpContentConverter
    • DefaultJsonHttpContentConverterConfiguration
    • FormUriEncodedContentConverter
    • StreamHttpContentConverter
    • StringConfiguration
    • StringHttpContentConverter
    • SyndicationFeedHttpContentConverter
    • XDocumentHttpContentConverter
  • Dapplo.HttpExtensions.Extensions
    • EnumExtensions
    • HttpBehaviourExtensions
    • StringExtensions
    • TypeExtensions
  • Dapplo.HttpExtensions.Factory
    • HttpClientFactory
    • HttpContentFactory
    • HttpMessageHandlerFactory
    • HttpRequestMessageFactory
    • WebProxyFactory
  • Dapplo.HttpExtensions.JsonNet
    • JsonNetJsonSerializer
    • ReadOnlyConsideringContractResolver
  • Dapplo.HttpExtensions.JsonSimple
    • DataContractJsonSerializerStrategy
    • DefaultJsonHttpContentConverter
    • IJsonSerializerStrategy
    • JsonExtensionDataAttribute
    • PocoJsonSerializerStrategy
    • SimpleJson
    • SimpleJsonSerializer
  • Dapplo.HttpExtensions.Listener
    • HttpListenerContextExtensions
    • ListenerPortExtensions
    • UriHttpListenerExtensions
  • Dapplo.HttpExtensions.OAuth
    • AuthorizeModes
    • BaseOAuthSettings
    • GrantTypes
    • ICodeReceiverSettings
    • IOAuth1Token
    • IOAuth2Token
    • IOAuthCodeReceiver
    • OAuth1HttpBehaviour
    • OAuth1HttpBehaviourFactory
    • OAuth1HttpMessageHandler
    • OAuth1Parameters
    • OAuth1RequestConfiguration
    • OAuth1Settings
    • OAuth1SignatureTransports
    • OAuth1SignatureTypes
    • OAuth1Token
    • OAuth2HttpBehaviourFactory
    • OAuth2HttpMessageHandler
    • OAuth2Settings
    • OAuth2TokenResponse
    • OAuthExtensions
  • Dapplo.HttpExtensions.OAuth.CodeReceivers
    • EmbeddedBrowserCodeReceiver
  • Dapplo.HttpExtensions.OAuth.Desktop
    • OAuthLoginForm
  • Dapplo.HttpExtensions.Support
    • HttpPartAttribute
    • HttpParts
    • HttpRequestAttribute
    • HttpResponseAttribute
    • HttpSettings
    • MediaTypes
    • ProgressStream
    • ProgressStreamReport
  • Dapplo.HttpExtensions.SystemTextJson
    • SystemTextJsonSerializer
  • Dapplo.HttpExtensions.WinForms.ContentConverter
    • BitmapConfiguration
    • BitmapHttpContentConverter
  • Dapplo.HttpExtensions.Wpf.ContentConverter
    • BitmapSourceConfiguration
    • BitmapSourceHttpContentConverter

Class BitmapSourceHttpContentConverter

This can convert HttpContent from/to a WPF BitmapImage

Inheritance
System.Object
BitmapSourceHttpContentConverter
Implements
IHttpContentConverter
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Dapplo.HttpExtensions.Wpf.ContentConverter
Assembly: Dapplo.HttpExtensions.Wpf.dll
Syntax
public class BitmapSourceHttpContentConverter : IHttpContentConverter

Properties

| Improve this Doc View Source

Instance

Instance of this IHttpContentConverter for reusing

Declaration
public static Lazy<BitmapSourceHttpContentConverter> Instance { get; }
Property Value
Type Description
System.Lazy<BitmapSourceHttpContentConverter>
| Improve this Doc View Source

Order

Specify the order in that this IHttpContentConverter is used

Declaration
public int Order { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

AddAcceptHeadersForType(Type, HttpRequestMessage)

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 async Task<object> ConvertFromHttpContentAsync(Type resultType, HttpContent httpContent, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Type resultType
System.Net.Http.HttpContent httpContent
System.Threading.CancellationToken cancellationToken
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
| Improve this Doc View Source

RegisterGlobally()

Register this ContentConverter to the HttpExtensionsGlobals.HttpContentConverters

Declaration
public static bool RegisterGlobally()
Returns
Type Description
System.Boolean

false if it was already registered, true if it was added

Implements

IHttpContentConverter
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © Dapplo