DiagramsFactoryCreateNodeFromDto Method

Method to create a NodeModel (for the diagram) from NodeDto (from the database)

Definition

Namespace: MobileTrack.Web.Components.Extensions
Assembly: MobileTrack.Web.Components (in MobileTrack.Web.Components.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
public static NodeModel CreateNodeFromDto(
	this NodeDto nodeDto,
	IAzureCosmosDb cosmosDb,
	ModalDropdownOptions options
)

Parameters

nodeDto  NodeDto
Populate NodeDto and register the unique types to blazor behaviorDiagram
cosmosDb  IAzureCosmosDb
Cosmos DB connection (required for template nodes)
options  ModalDropdownOptions
Options list in case we're dealing with a dropdown where the user needs to select a business object.

Return Value

NodeModel
Created node for the diagram

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type NodeDto. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ExceptionThrown if the node type isn't found in the code base.

See Also