Utilities Class
Namespace: StrideAssembly: Stride.Core.Assets.dll
public static class Utilities
| Name | Description | |
|---|---|---|
| Methods | ||
| BuildValidClassName(String, Char) | Build a valid C# class name from the provided string. It replaces all the forbidden characters by the provided replacement character. |
|
| BuildValidClassName(String, IEnumerable<String>, Char) | Build a valid C# class name from the provided string. It replaces all the forbidden characters by the provided replacement character. |
|
| BuildValidFileName(String, Char) | Build a valid file name from the provided string. It replaces all the forbidden characters by the provided replacement character. For reference see: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx |
|
| BuildValidNamespaceName(String, Char) | Build a valid C# namespace name from the provided string. It replaces all the forbidden characters by the provided replacement character. |
|
| BuildValidNamespaceName(String, IEnumerable<String>, Char) | Build a valid C# namespace name from the provided string. It replaces all the forbidden characters by the provided replacement character. |
|
| BuildValidProjectName(String, Char) | Build a valid C# project name from the provided string. It replaces all the forbidden characters by the provided replacement character. |
|
Methods
BuildValidClassName(String, Char)
Build a valid C# class name from the provided string. It replaces all the forbidden characters by the provided replacement character.
public static string BuildValidClassName(string originalName, char replacementCharacter = '_')
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | originalName | The original name |
| System.Char | replacementCharacter | The replacement character |
Returns
| Type | Description |
|---|---|
| System.String |
BuildValidClassName(String, IEnumerable<String>, Char)
Build a valid C# class name from the provided string. It replaces all the forbidden characters by the provided replacement character.
public static string BuildValidClassName(string originalName, IEnumerable<string> additionalReservedWords, char replacementCharacter = '_')
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | originalName | The original name |
| System.Collections.Generic.IEnumerable<System.String> | additionalReservedWords | Reserved words that must be escaped if used directly |
| System.Char | replacementCharacter | The replacement character |
Returns
| Type | Description |
|---|---|
| System.String |
BuildValidFileName(String, Char)
Build a valid file name from the provided string. It replaces all the forbidden characters by the provided replacement character. For reference see: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
public static string BuildValidFileName(string originalName, char replacementCharacter = '_')
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | originalName | The original name |
| System.Char | replacementCharacter | The replacement character |
Returns
| Type | Description |
|---|---|
| System.String |
BuildValidNamespaceName(String, Char)
Build a valid C# namespace name from the provided string. It replaces all the forbidden characters by the provided replacement character.
public static string BuildValidNamespaceName(string originalName, char replacementCharacter = '_')
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | originalName | The original name |
| System.Char | replacementCharacter | The replacement character |
Returns
| Type | Description |
|---|---|
| System.String |
BuildValidNamespaceName(String, IEnumerable<String>, Char)
Build a valid C# namespace name from the provided string. It replaces all the forbidden characters by the provided replacement character.
public static string BuildValidNamespaceName(string originalName, IEnumerable<string> additionalReservedWords, char replacementCharacter = '_')
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | originalName | The original name |
| System.Collections.Generic.IEnumerable<System.String> | additionalReservedWords | Reserved words that must be escaped if used directly |
| System.Char | replacementCharacter | The replacement character |
Returns
| Type | Description |
|---|---|
| System.String |
BuildValidProjectName(String, Char)
Build a valid C# project name from the provided string. It replaces all the forbidden characters by the provided replacement character.
public static string BuildValidProjectName(string originalName, char replacementCharacter = '_')
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | originalName | The original name |
| System.Char | replacementCharacter | The replacement character |
Returns
| Type | Description |
|---|---|
| System.String |