Back to Devexpress

IObjectSpace.IsKnownType(Type) Method

expressappframework-devexpress-dot-expressapp-dot-iobjectspace-dot-isknowntype-x28-system-dot-type-x29.md

latest5.9 KB
Original Source

IObjectSpace.IsKnownType(Type) Method

Returns the boolean value indicating whether or not the specified type is known by the IObjectSpace.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
bool IsKnownType(
    Type type
)
vb
Function IsKnownType(
    type As Type
) As Boolean

Parameters

NameTypeDescription
typeType

A Type object.

|

Returns

TypeDescription
Boolean

true , if the type is known; otherwise, false.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsKnownType(Type) 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.

XAF_Non-Persistent-Objects-Reloading-Demo/CS/XPO/NonPersReload/NonPersReload.Module/BusinessObjects/LiveSummary.cs#L43

csharp
if(!_Count.HasValue && ObjectSpace != null) {
    var pos = ((NonPersistentObjectSpace)ObjectSpace).AdditionalObjectSpaces.FirstOrDefault(os => os.IsKnownType(typeof(Order)));
    if(pos != null) {

XAF-CRUD-for-Non-Persistent-Objects-Stored-Remotely/CS/NonPersistentObjectsDemo.Module/BusinessObjects/NonPersistentObjectBase.cs#L30

csharp
protected IObjectSpace FindPersistentObjectSpace(Type type) {
    return ((NonPersistentObjectSpace)objectSpace).AdditionalObjectSpaces.FirstOrDefault(os => os.IsKnownType(type));
}

XAF_Non-Persistent-Objects-Edit-Linked-Persistent-Objects-Demo/CS/NonPersistentObjectsDemo.Module/BusinessObjects/NonPersistentObjectBase.cs#L30

csharp
protected IObjectSpace FindPersistentObjectSpace(Type type) {
    return ((NonPersistentObjectSpace)ObjectSpace).AdditionalObjectSpaces.FirstOrDefault(os => os.IsKnownType(type));
}

XAF_Non-Persistent-Objects-Filtering-Demo/CS/NonPersistentObjectsDemo.Module/BusinessObjects/NonPersistentObjectBase.cs#L29

csharp
protected IObjectSpace FindPersistentObjectSpace(Type type) {
    return ((NonPersistentObjectSpace)ObjectSpace).AdditionalObjectSpaces.FirstOrDefault(os => os.IsKnownType(type));
}

XAF-CRUD-for-Non-Persistent-Objects-Stored-Remotely/VB/NonPersistentObjectsDemo.Module/BusinessObjects/NonPersistentObjectBase.vb#L41

vb
Protected Function FindPersistentObjectSpace(ByVal type As Type) As IObjectSpace
    Return DirectCast(objectSpace_Conflict, NonPersistentObjectSpace).AdditionalObjectSpaces.FirstOrDefault(Function(os) os.IsKnownType(type))
End Function

XAF_Non-Persistent-Objects-Edit-Linked-Persistent-Objects-Demo/VB/NonPersistentObjectsDemo.Module/BusinessObjects/NonPersistentObjectBase.vb#L41

vb
Protected Function FindPersistentObjectSpace(ByVal type As Type) As IObjectSpace
    Return DirectCast(ObjectSpace, NonPersistentObjectSpace).AdditionalObjectSpaces.FirstOrDefault(Function(os) os.IsKnownType(type))
End Function

XAF_Non-Persistent-Objects-Filtering-Demo/VB/NonPersistentObjectsDemo.Module/BusinessObjects/NonPersistentObjectBase.vb#L40

vb
Protected Function FindPersistentObjectSpace(ByVal type As Type) As IObjectSpace
    Return DirectCast(ObjectSpace, NonPersistentObjectSpace).AdditionalObjectSpaces.FirstOrDefault(Function(os) os.IsKnownType(type))
End Function

See Also

IObjectSpace Interface

IObjectSpace Members

DevExpress.ExpressApp Namespace