DocumentManagerServiceExtensions.FindDocumentByIdOrCreate(IDocumentManagerService, Object, Func<IDocumentManagerService, IDocument>) Method

Static extension method that retrieves the document by the specified identifier. If a document with such an identifier does not exist, it will be created.

Namespace: DevExpress.Mvvm

Assembly: DevExpress.Mvvm.v20.2.dll


public static IDocument FindDocumentByIdOrCreate(
    this IDocumentManagerService service,
    object id,
    Func<IDocumentManagerService, IDocument> createDocumentCallback
Public Shared Function FindDocumentByIdOrCreate(
    service As IDocumentManagerService,
    id As Object,
    createDocumentCallback As Func(Of IDocumentManagerService, IDocument)
) As IDocument


Name Type Description
service IDocumentManagerService

The type the static extension method operates with.

id Object

An System.Object object that represents the document's IDocument.Id.

createDocumentCallback Func<IDocumentManagerService, IDocument>

A System.Func object specifying the Callback function of the document creation.


Type Description

An object implementing the IDocument interface.


To learn more about Callback functions, refer to Callback Functions.

See Also