Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let serializeSlot (s:Slot) =
- node "Slot"
- |> attr "Id" s.Id
- |> attr "TypeId" s.TypeId
- |> attr "Name" s.Name
- |> attr "Mode" (SlotMode.GetName s.Mode)
- let context =
- node "Context"
- |> attr "Id" x.Id
- |> attr "Name" x.Name
- |> child "DataTypeList"
- |> children x.DataTypes (fun kvp ->
- let dt = kvp.Value
- node "DataType"
- |> attr "Id" dt.Id
- |> attr "Name" dt.Name
- |> attr "Color" (Utils.ColorToString dt.Color))
- |> parent
- |> child "NodeTypeList"
- |> children x.NodeTypes (fun kvp ->
- let nt = kvp.Value
- node "NodeType"
- |> attr "Id" nt.Id
- |> attr "Name" nt.Name
- |> attr "Color" (Utils.ColorToString nt.Color)
- |> child "SlotsIn"
- |> children nt.SlotsIn serializeSlot
- |> parent
- |> child "SlotsOut"
- |> children nt.SlotsOut serializeSlot
- |> parent)
- |> parent
- |> child "LinkTypeList"
- |> children x.LinkTypes (fun kvp ->
- let lt = kvp.Value
- node "LinkType"
- |> attr "Id" lt.Id
- |> attr "Name" lt.Name
- |> attr "Color" (Utils.ColorToString lt.Color)
- )
- |> parent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement