Table of Contents

Class Utilities

Namespace
Stride
Assembly
Stride.Core.Assets.dll
public static class Utilities
Inheritance
Utilities

Examples

// This example demonstrates how to add C# code snippets to API documentation from external files, though it's unrelated to the subject matter.

var trigger = Entity.Get<PhysicsComponent>();

foreach (var collision in trigger.Collisions)
{
    //do something with the collision
}

Remarks

This remark serves as a demonstration of how to use overwrite files in API documentation. Overwrite files allow us to add a remarks section to the API docs seamlessly.

Note

This text is an example of how to incorporate notes within the documentation. Notes are useful for providing additional information about the subject. You can also use ticks ` for code snippets.

Caution

This text is an example of how to incorporate caution notes within the documentation to highlight important information or warnings.

Html support is also available in the remarks section.

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

originalName string

The original name

replacementCharacter char

The replacement character

Returns

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

originalName string

The original name

additionalReservedWords IEnumerable<string>

Reserved words that must be escaped if used directly

replacementCharacter char

The replacement character

Returns

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

originalName string

The original name

replacementCharacter char

The replacement character

Returns

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

originalName string

The original name

replacementCharacter char

The replacement character

Returns

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

originalName string

The original name

additionalReservedWords IEnumerable<string>

Reserved words that must be escaped if used directly

replacementCharacter char

The replacement character

Returns

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

originalName string

The original name

replacementCharacter char

The replacement character

Returns

string