Table of Contents

Class TypeExtensions

Namespace
MonoGame.Framework.Content.Pipeline.Builder
Assembly
MonoGame.Framework.Content.Pipeline.dll

Provides extension methods for common types.

public static class TypeExtensions
Inheritance
TypeExtensions
Inherited Members

Methods

AddRangeUnique<T>(List<T>, List<T>)

Adds a range of items to the list if they are not already present.

public static void AddRangeUnique<T>(this List<T> dstList, List<T> list)

Parameters

dstList List<T>

The list to add the items to.

list List<T>

The list of items to add.

Type Parameters

T

The type of the items in the list.

AddUnique<T>(List<T>, T)

Adds an item to the list if it is not already present.

public static void AddUnique<T>(this List<T> list, T item)

Parameters

list List<T>

The list to add the item to.

item T

The item to add to the list.

Type Parameters

T

The type of the items in the list.

ToColor(Color)

Takes a System.Drawing.Color and converts it to a Xna.Framework.Color.

public static Color ToColor(this Color color)

Parameters

color Color

The color to convert.

Returns

Color

The converted color.

ToVector3(Color)

Takes a System.Drawing.Color and converts it to a Vector3.

public static Vector3 ToVector3(this Color color)

Parameters

color Color

The color to convert.

Returns

Vector3

The resulting Vector3.