IObjectFactoryTryLoadObject Method |
Attempts to load an Object of the given type identified by the given Node and returned as the Type that this loader generates.
Namespace:
VDS.RDF.Configuration
Assembly:
dotNetRDF (in dotNetRDF.dll) Version:
Syntax bool TryLoadObject(
IGraph g,
INode objNode,
Type targetType,
out Object obj
)
Function TryLoadObject (
g As IGraph,
objNode As INode,
targetType As Type,
<OutAttribute> ByRef obj As Object
) As Boolean
Parameters
- g
- Type: VDS.RDFIGraph
Configuration Graph. - objNode
- Type: VDS.RDFINode
Object Node. - targetType
- Type: SystemType
Target Type. - obj
- Type: SystemObject
Created Object.
Return Value
Type:
BooleanTrue if the loader succeeded in creating an Object.
Remarks
The Factory should not throw an error if some required configuration is missing as another factory further down the processing chain may still be able to create the object. If the factory encounters errors and all the required configuration information is present then that error should be thrown i.e. class instantiation throws an error or a call to load an object that this object requires fails.
See Also