Skip to content

Commit

Permalink
Merge pull request #302 from atc-net/feature/LeftTopRightBottomType-L…
Browse files Browse the repository at this point in the history
…eftUpRightDownType

Add enums LeftTopRightBottomType and LeftUpRightDownType with some extensions method
  • Loading branch information
davidkallesen authored Jan 23, 2024
2 parents 0960172 + ad6317f commit 41bdaf5
Show file tree
Hide file tree
Showing 12 changed files with 857 additions and 5 deletions.
40 changes: 40 additions & 0 deletions docs/CodeDoc/Atc/Atc.md
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,46 @@ Enumeration: LeftRightType.
<br />
## LeftTopRightBottomType
Enumeration: LeftTopRightBottomType.
>```csharp
>public enum LeftTopRightBottomType
>```
| Value | Name | Description | Summary |
| --- | --- | --- | --- |
| 0 | None | None | Default None |
| 1 | Left | Left | Left |
| 2 | Top | Top | Top. |
| 3 | Right | Right | Right |
| 4 | Bottom | Bottom | Bottom. |
<br />
## LeftUpRightDownType
Enumeration: LeftUpRightDownType.
>```csharp
>public enum LeftUpRightDownType
>```
| Value | Name | Description | Summary |
| --- | --- | --- | --- |
| 0 | None | None | Default None |
| 1 | Left | Left | Left |
| 2 | Up | Up | Up. |
| 3 | Right | Right | Right |
| 4 | Down | Down | Down. |
<br />
## LetterAccentType
Expand Down
2 changes: 2 additions & 0 deletions docs/CodeDoc/Atc/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
- [IgnoreDisplayAttribute](Atc.md#ignoredisplayattribute)
- [InsertRemoveType](Atc.md#insertremovetype)
- [LeftRightType](Atc.md#leftrighttype)
- [LeftTopRightBottomType](Atc.md#lefttoprightbottomtype)
- [LeftUpRightDownType](Atc.md#leftuprightdowntype)
- [LetterAccentType](Atc.md#letteraccenttype)
- [LocalizedDescriptionAttribute](Atc.md#localizeddescriptionattribute)
- [LogCategoryType](Atc.md#logcategorytype)
Expand Down
24 changes: 23 additions & 1 deletion docs/CodeDoc/Atc/IndexExtended.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
- [IgnoreDisplayAttribute](Atc.md#ignoredisplayattribute)
- [InsertRemoveType](Atc.md#insertremovetype)
- [LeftRightType](Atc.md#leftrighttype)
- [LeftTopRightBottomType](Atc.md#lefttoprightbottomtype)
- [LeftUpRightDownType](Atc.md#leftuprightdowntype)
- [LetterAccentType](Atc.md#letteraccenttype)
- [LocalizedDescriptionAttribute](Atc.md#localizeddescriptionattribute)
- Properties
Expand Down Expand Up @@ -5043,10 +5045,30 @@
- Opposite(this ForwardReverseType forwardReverseType)
- Opposite(this InsertRemoveType insertRemoveType)
- Opposite(this LeftRightType leftRightType)
- Opposite(this LeftTopRightBottomType leftTopRightBottomType)
- Opposite(this LeftUpRightDownType leftUpRightDownType)
- Opposite(this OnOffType onOffType)
- Opposite(this SortDirectionType sortDirectionType)
- Opposite(this UpDownType yesNoType)
- Opposite(this UpDownType upDownType)
- Opposite(this YesNoType yesNoType)
- ToArrowDirectionType(this CardinalDirectionType cardinalDirectionType)
- ToArrowDirectionType(this LeftTopRightBottomType leftTopRightBottomType)
- ToArrowDirectionType(this LeftUpRightDownType leftUpRightDownType)
- ToCardinalDirectionType(this ArrowDirectionType arrowDirectionType)
- ToCardinalDirectionType(this LeftTopRightBottomType leftTopRightBottomType)
- ToCardinalDirectionType(this LeftUpRightDownType leftUpRightDownType)
- ToLeftTopRightBottomType(this ArrowDirectionType arrowDirectionType)
- ToLeftTopRightBottomType(this CardinalDirectionType cardinalDirectionType)
- ToLeftTopRightBottomType(this LeftRightType leftRightType)
- ToLeftTopRightBottomType(this LeftUpRightDownType leftUpRightDownType)
- ToLeftTopRightBottomType(this UpDownType upDownType)
- ToLeftUpRightDownType(this ArrowDirectionType arrowDirectionType)
- ToLeftUpRightDownType(this CardinalDirectionType cardinalDirectionType)
- ToLeftUpRightDownType(this LeftRightType leftRightType)
- ToLeftUpRightDownType(this LeftTopRightBottomType leftTopRightBottomType)
- ToLeftUpRightDownType(this UpDownType upDownType)
- ToSortDirectionType(this UpDownType upDownType)
- ToUpDownType(this SortDirectionType sortDirectionType)
- [EnumExtensions](System.md#enumextensions)
- Static Methods
- GetDescription(this Enum enumeration, bool useLocalizedIfPossible = True)
Expand Down
202 changes: 201 additions & 1 deletion docs/CodeDoc/Atc/System.md
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,26 @@ Provides extension methods for atc enum types.
><b>Returns:</b> The opposite ArrowDirectionType. Returns ArrowDirectionType.None if no opposite is defined.
#### Opposite
>```csharp
>LeftTopRightBottomType Opposite(this LeftTopRightBottomType leftTopRightBottomType)
>```
><b>Summary:</b> Gets the opposite direction of the specified ArrowDirectionType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to find the opposite for.<br />
>
><b>Returns:</b> The opposite ArrowDirectionType. Returns ArrowDirectionType.None if no opposite is defined.
#### Opposite
>```csharp
>LeftUpRightDownType Opposite(this LeftUpRightDownType leftUpRightDownType)
>```
><b>Summary:</b> Gets the opposite direction of the specified ArrowDirectionType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to find the opposite for.<br />
>
><b>Returns:</b> The opposite ArrowDirectionType. Returns ArrowDirectionType.None if no opposite is defined.
#### Opposite
>```csharp
>OnOffType Opposite(this OnOffType onOffType)
>```
><b>Summary:</b> Gets the opposite direction of the specified ArrowDirectionType.
Expand All @@ -1161,7 +1181,7 @@ Provides extension methods for atc enum types.
><b>Returns:</b> The opposite ArrowDirectionType. Returns ArrowDirectionType.None if no opposite is defined.
#### Opposite
>```csharp
>UpDownType Opposite(this UpDownType yesNoType)
>UpDownType Opposite(this UpDownType upDownType)
>```
><b>Summary:</b> Gets the opposite direction of the specified ArrowDirectionType.
>
Expand All @@ -1179,6 +1199,186 @@ Provides extension methods for atc enum types.
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to find the opposite for.<br />
>
><b>Returns:</b> The opposite ArrowDirectionType. Returns ArrowDirectionType.None if no opposite is defined.
#### ToArrowDirectionType
>```csharp
>ArrowDirectionType ToArrowDirectionType(this CardinalDirectionType cardinalDirectionType)
>```
><b>Summary:</b> Converts a CardinalDirectionType to an ArrowDirectionType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`cardinalDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The CardinalDirectionType to convert.<br />
>
><b>Returns:</b> ArrowDirectionType corresponding to the given CardinalDirectionType: - West is converted to ArrowDirectionType.Left - North is converted to ArrowDirectionType.Up - East is converted to ArrowDirectionType.Right - South is converted to ArrowDirectionType.Down - If no match, then default is ArrowDirectionType.None.
#### ToArrowDirectionType
>```csharp
>ArrowDirectionType ToArrowDirectionType(this LeftTopRightBottomType leftTopRightBottomType)
>```
><b>Summary:</b> Converts a CardinalDirectionType to an ArrowDirectionType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`cardinalDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The CardinalDirectionType to convert.<br />
>
><b>Returns:</b> ArrowDirectionType corresponding to the given CardinalDirectionType: - West is converted to ArrowDirectionType.Left - North is converted to ArrowDirectionType.Up - East is converted to ArrowDirectionType.Right - South is converted to ArrowDirectionType.Down - If no match, then default is ArrowDirectionType.None.
#### ToArrowDirectionType
>```csharp
>ArrowDirectionType ToArrowDirectionType(this LeftUpRightDownType leftUpRightDownType)
>```
><b>Summary:</b> Converts a CardinalDirectionType to an ArrowDirectionType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`cardinalDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The CardinalDirectionType to convert.<br />
>
><b>Returns:</b> ArrowDirectionType corresponding to the given CardinalDirectionType: - West is converted to ArrowDirectionType.Left - North is converted to ArrowDirectionType.Up - East is converted to ArrowDirectionType.Right - South is converted to ArrowDirectionType.Down - If no match, then default is ArrowDirectionType.None.
#### ToCardinalDirectionType
>```csharp
>CardinalDirectionType ToCardinalDirectionType(this ArrowDirectionType arrowDirectionType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an CardinalDirectionType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> CardinalDirectionType corresponding to the given ArrowDirectionType: - Left is converted to CardinalDirectionType.West - Up is converted to CardinalDirectionType.North - Right is converted to CardinalDirectionType.East - Down is converted to CardinalDirectionType.South - If no match, then default is CardinalDirectionType.None
#### ToCardinalDirectionType
>```csharp
>CardinalDirectionType ToCardinalDirectionType(this LeftTopRightBottomType leftTopRightBottomType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an CardinalDirectionType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> CardinalDirectionType corresponding to the given ArrowDirectionType: - Left is converted to CardinalDirectionType.West - Up is converted to CardinalDirectionType.North - Right is converted to CardinalDirectionType.East - Down is converted to CardinalDirectionType.South - If no match, then default is CardinalDirectionType.None
#### ToCardinalDirectionType
>```csharp
>CardinalDirectionType ToCardinalDirectionType(this LeftUpRightDownType leftUpRightDownType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an CardinalDirectionType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> CardinalDirectionType corresponding to the given ArrowDirectionType: - Left is converted to CardinalDirectionType.West - Up is converted to CardinalDirectionType.North - Right is converted to CardinalDirectionType.East - Down is converted to CardinalDirectionType.South - If no match, then default is CardinalDirectionType.None
#### ToLeftTopRightBottomType
>```csharp
>LeftTopRightBottomType ToLeftTopRightBottomType(this ArrowDirectionType arrowDirectionType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an LeftTopRightBottomType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> LeftTopRightBottomType corresponding to the given ArrowDirectionType: - Left is converted to LeftTopRightBottomType.Left - Up is converted to LeftTopRightBottomType.Top - Right is converted to LeftTopRightBottomType.Right - Down is converted to LeftTopRightBottomType.Bottom - If no match, then default is LeftTopRightBottomType.None
#### ToLeftTopRightBottomType
>```csharp
>LeftTopRightBottomType ToLeftTopRightBottomType(this CardinalDirectionType cardinalDirectionType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an LeftTopRightBottomType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> LeftTopRightBottomType corresponding to the given ArrowDirectionType: - Left is converted to LeftTopRightBottomType.Left - Up is converted to LeftTopRightBottomType.Top - Right is converted to LeftTopRightBottomType.Right - Down is converted to LeftTopRightBottomType.Bottom - If no match, then default is LeftTopRightBottomType.None
#### ToLeftTopRightBottomType
>```csharp
>LeftTopRightBottomType ToLeftTopRightBottomType(this LeftRightType leftRightType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an LeftTopRightBottomType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> LeftTopRightBottomType corresponding to the given ArrowDirectionType: - Left is converted to LeftTopRightBottomType.Left - Up is converted to LeftTopRightBottomType.Top - Right is converted to LeftTopRightBottomType.Right - Down is converted to LeftTopRightBottomType.Bottom - If no match, then default is LeftTopRightBottomType.None
#### ToLeftTopRightBottomType
>```csharp
>LeftTopRightBottomType ToLeftTopRightBottomType(this LeftUpRightDownType leftUpRightDownType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an LeftTopRightBottomType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> LeftTopRightBottomType corresponding to the given ArrowDirectionType: - Left is converted to LeftTopRightBottomType.Left - Up is converted to LeftTopRightBottomType.Top - Right is converted to LeftTopRightBottomType.Right - Down is converted to LeftTopRightBottomType.Bottom - If no match, then default is LeftTopRightBottomType.None
#### ToLeftTopRightBottomType
>```csharp
>LeftTopRightBottomType ToLeftTopRightBottomType(this UpDownType upDownType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an LeftTopRightBottomType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> LeftTopRightBottomType corresponding to the given ArrowDirectionType: - Left is converted to LeftTopRightBottomType.Left - Up is converted to LeftTopRightBottomType.Top - Right is converted to LeftTopRightBottomType.Right - Down is converted to LeftTopRightBottomType.Bottom - If no match, then default is LeftTopRightBottomType.None
#### ToLeftUpRightDownType
>```csharp
>LeftUpRightDownType ToLeftUpRightDownType(this ArrowDirectionType arrowDirectionType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an LeftUpRightDownType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> LeftUpRightDownType corresponding to the given ArrowDirectionType: - Left is converted to LeftUpRightDownType.Left - Up is converted to LeftUpRightDownType.Up - Right is converted to LeftUpRightDownType.Right - Down is converted to LeftUpRightDownType.Down - If no match, then default is LeftUpRightDownType.None
#### ToLeftUpRightDownType
>```csharp
>LeftUpRightDownType ToLeftUpRightDownType(this CardinalDirectionType cardinalDirectionType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an LeftUpRightDownType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> LeftUpRightDownType corresponding to the given ArrowDirectionType: - Left is converted to LeftUpRightDownType.Left - Up is converted to LeftUpRightDownType.Up - Right is converted to LeftUpRightDownType.Right - Down is converted to LeftUpRightDownType.Down - If no match, then default is LeftUpRightDownType.None
#### ToLeftUpRightDownType
>```csharp
>LeftUpRightDownType ToLeftUpRightDownType(this LeftRightType leftRightType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an LeftUpRightDownType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> LeftUpRightDownType corresponding to the given ArrowDirectionType: - Left is converted to LeftUpRightDownType.Left - Up is converted to LeftUpRightDownType.Up - Right is converted to LeftUpRightDownType.Right - Down is converted to LeftUpRightDownType.Down - If no match, then default is LeftUpRightDownType.None
#### ToLeftUpRightDownType
>```csharp
>LeftUpRightDownType ToLeftUpRightDownType(this LeftTopRightBottomType leftTopRightBottomType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an LeftUpRightDownType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> LeftUpRightDownType corresponding to the given ArrowDirectionType: - Left is converted to LeftUpRightDownType.Left - Up is converted to LeftUpRightDownType.Up - Right is converted to LeftUpRightDownType.Right - Down is converted to LeftUpRightDownType.Down - If no match, then default is LeftUpRightDownType.None
#### ToLeftUpRightDownType
>```csharp
>LeftUpRightDownType ToLeftUpRightDownType(this UpDownType upDownType)
>```
><b>Summary:</b> Converts a ArrowDirectionType to an LeftUpRightDownType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`arrowDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The ArrowDirectionType to convert.<br />
>
><b>Returns:</b> LeftUpRightDownType corresponding to the given ArrowDirectionType: - Left is converted to LeftUpRightDownType.Left - Up is converted to LeftUpRightDownType.Up - Right is converted to LeftUpRightDownType.Right - Down is converted to LeftUpRightDownType.Down - If no match, then default is LeftUpRightDownType.None
#### ToSortDirectionType
>```csharp
>SortDirectionType ToSortDirectionType(this UpDownType upDownType)
>```
><b>Summary:</b> Converts a UpDownType to an SortDirectionType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`upDownType`&nbsp;&nbsp;-&nbsp;&nbsp;The UpDownType to convert.<br />
>
><b>Returns:</b> SortDirectionType corresponding to the given UpDownType: - Up is converted to SortDirectionType.Ascending - Down is converted to SortDirectionType.Descending - If no match, then default is SortDirectionType.None
#### ToUpDownType
>```csharp
>UpDownType ToUpDownType(this SortDirectionType sortDirectionType)
>```
><b>Summary:</b> Converts a SortDirectionType to an UpDownType.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`sortDirectionType`&nbsp;&nbsp;-&nbsp;&nbsp;The SortDirectionType to convert.<br />
>
><b>Returns:</b> UpDownType corresponding to the given SortDirectionType: - Ascending is converted to UpDownType.Up - Descending is converted to UpDownType.Down - If no match, then default is UpDownType.None
<br />
Expand Down
38 changes: 38 additions & 0 deletions src/Atc/Enums/LeftTopRightBottomType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// ReSharper disable once CheckNamespace
namespace Atc;

/// <summary>
/// Enumeration: LeftTopRightBottomType.
/// </summary>
public enum LeftTopRightBottomType
{
/// <summary>
/// Default None
/// </summary>
[LocalizedDescription(null, typeof(EnumResources))]
None = 0,

/// <summary>
/// Left
/// </summary>
[LocalizedDescription("LeftTopRightBottomTypeLeft", typeof(EnumResources))]
Left = 1,

/// <summary>
/// Top.
/// </summary>
[LocalizedDescription("LeftTopRightBottomTypeTop", typeof(EnumResources))]
Top = 2,

/// <summary>
/// Right
/// </summary>
[LocalizedDescription("LeftTopRightBottomTypeRight", typeof(EnumResources))]
Right = 3,

/// <summary>
/// Bottom.
/// </summary>
[LocalizedDescription("LeftTopRightBottomTypeBottom", typeof(EnumResources))]
Bottom = 4,
}
38 changes: 38 additions & 0 deletions src/Atc/Enums/LeftUpRightDownType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// ReSharper disable once CheckNamespace
namespace Atc;

/// <summary>
/// Enumeration: LeftUpRightDownType.
/// </summary>
public enum LeftUpRightDownType
{
/// <summary>
/// Default None
/// </summary>
[LocalizedDescription(null, typeof(EnumResources))]
None = 0,

/// <summary>
/// Left
/// </summary>
[LocalizedDescription("LeftRightTypeLeft", typeof(EnumResources))]
Left = 1,

/// <summary>
/// Up.
/// </summary>
[LocalizedDescription("UpDownTypeUp", typeof(EnumResources))]
Up = 2,

/// <summary>
/// Right
/// </summary>
[LocalizedDescription("LeftRightTypeRight", typeof(EnumResources))]
Right = 3,

/// <summary>
/// Down.
/// </summary>
[LocalizedDescription("UpDownTypeDown", typeof(EnumResources))]
Down = 4,
}
Loading

0 comments on commit 41bdaf5

Please sign in to comment.