Movatterモバイル変換


[0]ホーム

URL:


CefSharp API Doc
CefSharp API Doc
Namespaces
CefSharp
ResourceHandler Class
ResourceHandler Constructor
ResourceHandler Properties
ResourceHandler Methods
ResourceHandler Fields
Click or drag to resizeClick or drag to resize

ResourceHandler Class

Version 118.6.80
Default implementation ofIResourceHandler. This latest implementation provides some simplification, at a minimum you only need to override ProcessRequestAsync. See the project source on GitHub for working examples. used to implement a custom request handler interface. The methods of this class will always be called on the IO thread. Static helper methods are included like FromStream and FromString that make dealing with fixed resources easy.
Inheritance Hierarchy
SystemObject
  CefSharpResourceHandler
    CefSharp.SchemeHandlerOwinResourceHandler

Namespace:  CefSharp
Assembly:  CefSharp (in CefSharp.dll) Version: 118.6.80.0 (118.6.80.0)
Syntax
publicclassResourceHandler :IResourceHandler,IDisposable
publicref classResourceHandler :IResourceHandler,IDisposable

TheResourceHandler type exposes the following members.

Constructors
 NameDescription
Public methodResourceHandler
Initializes a new instance of theResourceHandler class.
Top
Properties
 NameDescription
Public propertyAutoDisposeStream
When true the Stream will be Disposed when this instance is Disposed. The default value for this property is false.
Public propertyCharset
Gets or sets the Charset
Public propertyErrorCode
If the ErrorCode is set then the response will be ignored and the errorCode returned.
Public propertyHeaders
Gets or sets the headers.
Public propertyMimeType
Gets or sets the Mime Type.
Public propertyResponseLength
Gets or sets ResponseLength, when you know the size of your Stream (Response) set this property. This is optional. If you use a MemoryStream and don't provide a value here then it will be cast and its size used
Public propertyStatusCode
Gets or sets the http status code.
Public propertyStatusText
Gets or sets the status text.
Public propertyStream
Gets or sets the resource stream.
Top
Methods
 NameDescription
Public methodDispose
Dispose of resources here
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited fromObject.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited fromObject.)
Public methodStatic memberForErrorMessage
Generates a ResourceHandler that has it's StatusCode set
Public methodStatic memberFromByteArray
Creates a IResourceHandler that represents a Byte[], uses CefStreamResourceHandler for reading the data
Public methodStatic memberFromFilePath
Gets the resource from the file path specified. Use the Cef.GetMimeType() helper method to lookup the mimeType if required. Uses CefStreamResourceHandler for reading the data
Public methodStatic memberFromStream
Gets the resource from a stream.
Public methodStatic memberFromString(String, String)Obsolete.
Gets the resource from the string.
Public methodStatic memberFromString(String, Encoding, Boolean, String)
Gets aResourceHandler that represents a string. Without a Preamble, Cef will use BrowserSettings.DefaultEncoding to load the html.
Public methodStatic memberGetByteArray
Gets a byteArray from the given string using the provided encoding
Public methodGetHashCode
Serves as the default hash function.
(Inherited fromObject.)
Public methodStatic memberGetMemoryStream
Gets a MemoryStream from the given string using the provided encoding
Public methodStatic memberGetMimeType
Gets the MIME type of the content.
Public methodGetType
Gets theType of the current instance.
(Inherited fromObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the currentObject.
(Inherited fromObject.)
Public methodProcessRequestAsync
Begin processing the request. If you have the data in memory you can execute the callback immediately and return true. For Async processing you would typically spawn a Task to perform processing, then return true. When the processing is complete execute callback.Continue(); In your processing Task, simply set the StatusCode, StatusText, MimeType, ResponseLength and Stream
Public methodToString
Returns a string that represents the current object.
(Inherited fromObject.)
Top
Fields
 NameDescription
Public fieldStatic memberDefaultMimeType
MimeType to be used if none provided
Top
See Also

Reference

CefSharp Namespace

https://raw.githubusercontent.com/cefsharp/CefSharp/master/LICENSE


[8]ページ先頭

©2009-2025 Movatter.jp