Back to Devexpress

IObjectSpace.GetObjectByHandle(String) Method

expressappframework-devexpress-dot-expressapp-dot-iobjectspace-dot-getobjectbyhandle-x28-system-dot-string-x29.md

latest2.5 KB
Original Source

IObjectSpace.GetObjectByHandle(String) Method

Returns the object with the specified handle.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
object GetObjectByHandle(
    string handle
)
vb
Function GetObjectByHandle(
    handle As String
) As Object

Parameters

NameTypeDescription
handleString

A string holding the key property value and type of the specified object, representing the handle of the object that will be retrieved.

|

Returns

TypeDescription
Object

An object which has the specified handle.

|

Remarks

The object handle is a string of the following format:

Solution1.Module.BusinessObjects.MyEntityObject(1)

Here, Solution1.Module.BusinessObjects.MyEntityObject is the FullName of the object type and 1 is the object’s key property value. To get the handle of an existing object, use the IObjectSpace.GetObjectHandle method.

When implementing the IObjectSpace interface in the BaseObjectSpace class’s descendant, don’t implement the GetObjectByHandle method. It’s implemented in the BaseObjectSpace class. The BaseObjectSpace.GetObjectByHandle method parses the handler passed as the handle parameter using the DevExpress.ExpressApp.ObjectHandleHelper class and calls the BaseObjectSpace.GetObjectByKey method to get the object to return.

See Also

IObjectSpace Interface

IObjectSpace Members

DevExpress.ExpressApp Namespace