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