Skip to content

Commit b583b92

Browse files
Handing over to Tyler - incomplete changes
1 parent fb87049 commit b583b92

File tree

17 files changed

+340
-25
lines changed

17 files changed

+340
-25
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
title: "Containers"
33
linkTitle: "Containers"
4-
description: "Blocks used to organise flows and group related logic together."
4+
description: "Blocks used to organise flows and group related logic and actions together."
55
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "Xml"
3+
linkTitle: "Xml"
4+
description: "Blocks related to working with Xml."
5+
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "Convert Xml"
3+
linkTitle: "Convert Xml"
4+
description: "Convert xml to and from other data types."
5+
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
---
2+
title: "Convert Structure To Xml"
3+
linkTitle: "Convert Structure To Xml"
4+
description: "Converts a Structure To Xml."
5+
---
6+
7+
![Icon](/blocks/xml-convert-to-xml-block-icon.png)
8+
9+
# {{< param title >}}
10+
11+
<p class="namespace">(Cortex.Blocks.Xml.ConvertXml.ConvertStructureToXmlBlock)</p>
12+
13+
## Description
14+
15+
Converts a [Structure][Structure Property] to [Xml][Json Property].
16+
17+
## Examples
18+
19+
### Convert a Structure to Xml
20+
21+
This example will convert `TODO` to its Xml representation.
22+
23+
#### Properties
24+
25+
| Property | Value | Notes |
26+
|--------------------|---------------------------|------------------------------------------|
27+
| [Structure][Structure Property] | `($)Structure`, with value `{TODO}` | `($)Structure` is a variable of type [Structure][] |
28+
| [Xml][Xml Property] | `($)Xml`, with no value | `($)Xml` is a variable that will be set to a [String][] value. |
29+
30+
#### Result
31+
32+
Converting `{TODO}` to Xml results in the variable `($)Xml` being updated to the following:
33+
34+
```json
35+
"TODO"
36+
```
37+
38+
Explain how conversion works?
39+
40+
***
41+
42+
### TODO Different examples
43+
44+
TODO
45+
46+
#### Properties
47+
48+
| Property | Value | Notes |
49+
|--------------------|---------------------------|------------------------------------------|
50+
| [Structure][Structure Property] | `($)Structure`, with value `{TODO}` | `($)Structure` is a variable of type [Structure][] |
51+
| [Xml][Xml Property] | `($)Xml`, with no value | `($)Xml` is a variable that will be set to a [String][] value. |
52+
53+
#### Result
54+
55+
TODO
56+
57+
```json
58+
TODO
59+
```
60+
61+
***
62+
63+
## Properties
64+
65+
### Structure
66+
67+
The [Structure][Structure Property] to convert to [Xml][Xml Property].
68+
69+
TODO
70+
71+
| | |
72+
|--------------------|---------------------------|
73+
| Data Type | [Structure][] |
74+
| Property Type | [Input][] |
75+
| Default Value | `($)Structure` with value `null` |
76+
77+
### Xml
78+
79+
The [Xml][Xml Property] that has been converted from the [Structure][Structure Property].
80+
81+
TODO
82+
83+
| | |
84+
|--------------------|---------------------------|
85+
| Data Type | [String][] |
86+
| Property Type | [Output][] |
87+
| Default Value | `($)Xml` with no value |
88+
89+
## Exceptions
90+
91+
The exceptions thrown by the block can be found below:
92+
93+
| Name | Description |
94+
|----------|----------|
95+
| [PropertyEmptyException][] | Thrown when [Structure][Structure Property] does not contain any items. |
96+
| [PropertyNullException][] | Thrown when [Structure][Structure Property] is `null`. |
97+
| [XmlSerializationException][] | Thrown when [Structure][Structure Property] has a key that is an empty string. |
98+
99+
## Remarks
100+
101+
### Round-tripping
102+
103+
It should be possible to pass the Xml created by this block to the [Convert Xml To Structure][] block, and then pass the [Structure][Structure Property] created by the [Convert Xml To Structure][] block back to this block; this is called round-tripping.
104+
105+
[Structure Property]: {{< ref "#structure" >}}
106+
[Xml Property]: {{< ref "#xml" >}}
107+
108+
[Input]: {{< url "Cortex.Reference.Concepts.PropertyType.Input" >}}
109+
[Output]: {{< url "Cortex.Reference.Concepts.PropertyType.Output" >}}
110+
111+
[PropertyEmptyException]: {{< url "Cortex.Reference.Exceptions.Common.Property.PropertyEmptyException.MainDoc" >}}
112+
[PropertyNullException]: {{< url "Cortex.Reference.Exceptions.Common.Property.PropertyNullException.MainDoc" >}}
113+
[XmlSerializationException]: {{< url "JsonDotNet.XmlSerializationException" >}}
114+
115+
116+
117+
[Structure]: {{< url "Cortex.Reference.DataTypes.MostCommon.Structure" >}}
118+
[String]: {{< url "Cortex.Reference.DataTypes.MostCommon.String" >}}
119+
120+
121+
/// If there are multiple items in the specified structure, a root node is automatically added to make it valid xml (added root node: "Cortex_FlowEngine_Core_Types_Structure")
122+
123+
/// If a node requires an attribute, use a key value pair where the key is the attribute name with an "@" before it and the value is the attribute data.
124+
125+
/// If data does not require nodes and is within the same element as data that does require nodes, use a key value pair where the key is "#text" and the value is the node-less data.
126+
127+
/// If multiple of the same nodes are required are within the same element, use a key value pair where the key is the node and the value is a list with the nodes data.
128+
129+
/// If the specified structure includes an ampersand symbol in a node's name, the xml will return with "_x0026_" in place of the ampersand symbol.
130+
131+
/// If the specified structure includes an ampersand symbol in a node's data, the xml will return with "&amp;" in place of the ampersand symbol.
132+
133+
134+
/// </remarks>
135+
136+
/// <example>
137+
/// structure: {
138+
/// "msg&amp;": {
139+
/// "@attr" : "exampleAttribute"
140+
/// "id" :
141+
/// [
142+
/// "1",
143+
/// "2",
144+
/// "3"
145+
/// ],
146+
/// "action" : "stop&amp;"
147+
/// "#text" : "hello"
148+
/// }
149+
/// }
150+
///
151+
/// xml: "<msg_x0026_ attr="exampleAttribute"><id>1</id><id>2</id><id>3</id><action>stop&amp;</action>hello</msg_x0026_>"
152+
/// </example>
153+
/// <example>
154+
/// structure: {
155+
/// {
156+
/// "id" : "1"
157+
/// },
158+
/// {
159+
/// "id2" : "2"
160+
/// },
161+
/// {
162+
/// "id3" : "3"
163+
/// }
164+
/// }
165+
///
166+
/// xml: "<Cortex_FlowEngine_Core_Types_Structure><id>1</id><id2>2</id2><id3>3</id3></Cortex_FlowEngine_Core_Types_Structure>"
167+
/// </example>
168+
void ConvertStructureToXml(Structure structure, out string xml);
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
title: "Working with Collections"
33
linkTitle: "Working with Collections"
4-
description: "Information related to working with collections such as Lists, Dictionaries and Structures"
4+
description: "Information related to working with collections such as Lists, Dictionaries and Structures."
55
---
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
title: "Working with Date and Time"
33
linkTitle: "Working with Date and Time"
4-
description: "Information related to working with Date and Time"
4+
description: "Information related to working with Date and Time."
55
---
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
title: "Working with Exceptions"
33
linkTitle: "Working with Exceptions"
4-
description: "Information related to working with Exceptions"
4+
description: "Information related to working with Exceptions."
55
---
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
---
22
title: "Working with Files and Folders"
33
linkTitle: "Working with Files and Folders"
4-
description: "Information related to working with Files and Folders"
4+
description: "Information related to working with Files and Folders."
55
---
6+
7+
TODO: WOrking with Files and Folders:
8+
9+
* https://docs.microsoft.com/en-us/dotnet/standard/io/
10+
* https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats
11+
* https://docs.microsoft.com/en-us/dotnet/standard/io/handling-io-errors
12+
* https://docs.microsoft.com/en-us/dotnet/standard/io/common-i-o-tasks

content/en/docs/Reference/Concepts/fundamentals/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Fundamental Concepts"
33
linkTitle: "Fundamental Concepts"
4-
description: "Fundamental concepts when working with Cortex Evolution"
4+
description: "Fundamental concepts when working with Cortex Evolution."
55
weight: 1
66
---
77

content/en/docs/Reference/Concepts/fundamentals/culture.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Culture"
33
linkTitle: "Culture"
4-
description: "This page describes the concept of Culture."
4+
description: "This page describes the concept of culture."
55
---
66

77
# {{< param title >}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "Working with Numbers"
3+
linkTitle: "Working with Numbers"
4+
description: "Information related to working with Numbers."
5+
---
6+
7+
TODO: Working with Numbers - https://docs.microsoft.com/en-us/dotnet/standard/base-types/parsing-numeric

content/en/docs/Reference/Concepts/text-casing.md

+28-15
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,51 @@ description: "This page describes the concept of Text Casing."
66

77
# {{< param title >}}
88

9-
## Overview
9+
## Common types of text casing
1010

11-
TODO: Overview/summary
11+
There are many different types of text casing.
12+
13+
The table below lists some of the most common types of text casing:
14+
15+
| Name | Example | Notes |
16+
|-----------|----------------------------|-------------|
17+
| lowercase | `"this is lowercase"` | All letters in all words are lower cased. |
18+
| UPPERCASE | `"THIS IS UPPERCASE"` | All letters in all words are capitalized. |
19+
| Title Case | `"This Is Title Case"` | First letter in all words is capitalized, all other letters are lower cased; except for words that are entirely upper cased, such as acronyms, which remain upper cased; spaces and punctuation are preserved. |
20+
| camelCase | `"thisIsCamelCase"` | First letter in all words (except the first) is capitalized, all other letters are lower cased, and all spaces and punctuation are removed. |
21+
| PascalCase | `"ThisIsCamelCase"` | First letter in all words is capitalized, all other letters are lower cased, and all spaces and punctuation are removed. |
1222

1323
## Culture Info
1424

1525
Culture Info specifies the culture-specific casing rules used to determine how the case of text is changed.
1626

17-
The table below lists the supported culture info:
18-
19-
TODO: Full list
27+
The table below lists the most common supported culture info:
2028

2129
| Name | Text&nbsp;Value | Description |
2230
|----------|-----------------|-------------|
2331
| Current&nbsp;Culture | CultureInfo.CurrentCulture | Used to compare text using culture-sensitive sort rules and the [current culture][]. Case of the texts is considered when comparing. |
2432
| Invariant&nbsp;Culture | CultureInfo.InvariantCulture | Used to compare text using culture-sensitive sort rules and the [invariant culture][]. Case of the texts is considered when comparing. |
2533

34+
TODO: See XYZ for a full list - link to microsoft full list
35+
2636
For more information about culture info, please see [CultureInfo].
2737

38+
TODO: Probably should link to fundamentals->culture
39+
40+
TODO: When to use? If not sure what to choose?
41+
2842
### Current Culture
2943

44+
For Current Culture, the casing rules used to determine how the case of text is changed are culture-sensitive and based on the culture that the flow execution is currently running as. The Current Culture will be the culture of the operating system the flow execution is running on.
45+
46+
TODO: Best practices - all OSes in cluster should be installed with same OS culture and settings etc. - should also be time sync'd
47+
3048
TODO: notes about current culture and a worked through example
3149

3250
### Invariant Culture
3351

52+
For Invariant Culture, the casing rules used to determine how the case of text is changed are not culture-sensitive.
53+
3454
TODO: notes about invariant culture and a worked through example
3555

3656
[Current Culture]: {{< ref "#current-culture" >}}
@@ -39,15 +59,8 @@ TODO: notes about invariant culture and a worked through example
3959
[CultureInfo]: {{< url "MSDocs.DotNet.Api.System.Globalization.CultureInfo" >}}
4060

4161

42-
TODO: Working with Text - https://docs.microsoft.com/en-us/dotnet/standard/base-types/basic-string-operations
43-
44-
TODO: Working with Numbers - https://docs.microsoft.com/en-us/dotnet/standard/base-types/parsing-numeric
45-
46-
TODO: WOrking with Files and Folders:
62+
TODO: From https://docs.microsoft.com/en-us/dotnet/api/system.globalization.textinfo.toupper?view=net-6.0
4763

48-
* https://docs.microsoft.com/en-us/dotnet/standard/io/
49-
* https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats
50-
* https://docs.microsoft.com/en-us/dotnet/standard/io/handling-io-errors
51-
* https://docs.microsoft.com/en-us/dotnet/standard/io/common-i-o-tasks
64+
If a security decision depends on a string comparison or a case-change operation, the application should use the InvariantCulture to ensure that the behavior is consistent regardless of the culture settings of the system. However, the invariant culture must be used only by processes that require culture-independent results, such as system services. Otherwise, it produces results that might be linguistically incorrect or culturally inappropriate.
5265

53-
TODO: Security https://docs.microsoft.com/en-us/dotnet/standard/security/
66+
For more information on cultures, see CultureInfo.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: "Working with Text"
33
linkTitle: "Working with Text"
4-
description: "Information related to working with Text"
4+
description: "Information related to working with Text."
55
---
6+
7+
TODO: Working with Text - https://docs.microsoft.com/en-us/dotnet/standard/base-types/basic-string-operations

content/en/docs/Reference/Exceptions/files-and-folders/OperationFailedException.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,41 @@ description: "The exception thrown when a file or folder operation failed for on
1010

1111
The exception thrown when a file or folder operation failed for one or more paths.
1212

13+
## Path Exceptions
14+
15+
### PathDoesNotExist
16+
1317
The format of the exception message is as follows:
1418

1519
```json
1620
"TODO.
1721
Please click the HelpLink for more information on how to fix this."
1822
```
1923

20-
## Path Exceptions
24+
#### How to fix
25+
26+
TODO:
27+
28+
#### Blocks that can throw this exception
29+
30+
TODO:
31+
32+
### PathTooLong
33+
34+
The format of the exception message is as follows:
35+
36+
```json
37+
"TODO.
38+
Please click the HelpLink for more information on how to fix this."
39+
```
40+
41+
#### How to fix
42+
43+
TODO:
44+
45+
#### Blocks that can throw this exception
46+
47+
TODO:
2148

2249
## Indexes Of Duplicate Paths
2350

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "Numbers"
3+
linkTitle: "Numbers"
4+
description: "This section includes all reference documentation for number data types."
5+
weight: 10
6+
---

0 commit comments

Comments
 (0)