Back to Devexpress

IUriProviderService.RegisterProvider(IUriProvider) Method

officefileapi-devexpress-dot-office-dot-services-dot-iuriproviderservice-dot-registerprovider-x28-devexpress-dot-office-dot-services-dot-iuriprovider-x29.md

latest3.3 KB
Original Source

IUriProviderService.RegisterProvider(IUriProvider) Method

Registers the URI provider and makes it available to clients of the service.

Namespace : DevExpress.Office.Services

Assembly : DevExpress.Office.v25.2.Core.dll

NuGet Package : DevExpress.Office.Core

Declaration

csharp
void RegisterProvider(
    IUriProvider provider
)
vb
Sub RegisterProvider(
    provider As IUriProvider
)

Parameters

NameTypeDescription
providerIUriProvider

An object which exposes the IUriProvider interface.

|

Remarks

Use the RegisterProvider method to add a custom provider object that is used by a IUriProviderService service to construct the URI.

The RegisterProvider method inserts the specified provider at the beginning of the provider list. When the IUriProviderService.CreateCssUri or the IUriProviderService.CreateImageUri methods are called, this provider will be polled first.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RegisterProvider(IUriProvider) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-rich-text-editor-retain-original-image-uri-in-html-document/CS/Form1.cs#L40

csharp
{
    service.RegisterProvider(new CustomUriProvider());
}

winforms-rich-text-editor-retain-original-image-uri-in-html-document/VB/Form1.vb#L34

vb
If service IsNot Nothing Then
    service.RegisterProvider(New CustomUriProvider())
End If

See Also

IUriProviderService Interface

IUriProviderService Members

DevExpress.Office.Services Namespace