The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

IRichEditDocumentServer.ReplaceService<T>(T) Method

Performs a service substitution.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v19.2.Core.dll

Declaration

T ReplaceService<T>(
    T newService
)
    where T : class
Function ReplaceService(Of T As Class)(
    newService As T
) As T
T ReplaceService<T>(
    T newService
)
    where T : class
Function ReplaceService(Of T As Class)(
    newService As T
) As T
T ReplaceService<T>(
    T newService
)
    where T : class
Function ReplaceService(Of T As Class)(
    newService As T
) As T

Parameters

Name Type Description
newService T

A service of the specified type that will replace the former service.

Parameters

Name Type Description
newService T

A service of the specified type that will replace the former service.

Parameters

Name Type Description
newService T

A service of the specified type that will replace the former service.

Returns

Type Description
T

Previously registered service of the specified type, or null (Nothing in Visual Basic) if the service does not exist.

Returns

Type Description
T

Previously registered service of the specified type, or null (Nothing in Visual Basic) if the service does not exist.

Returns

Type Description
T

Previously registered service of the specified type, or null (Nothing in Visual Basic) if the service does not exist.

Type Parameters

Name Description
T

Type Parameters

Name Description
T

Type Parameters

Name Description
T

Remarks

Use the ReplaceService<T> method instead of the IRichEditDocumentServer.GetService<T> -> RemoveService -> AddService method sequence.

See Also