Gorgon
Show / Hide Table of Contents

Class GorgonGamingDeviceAxisList<T>

A list of axis data values for a gaming device.

Inheritance
object
GorgonGamingDeviceAxisList<T>
Implements
IReadOnlyList<T>
IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Gorgon.Input
Assembly: Gorgon.Input.dll
Syntax
public sealed class GorgonGamingDeviceAxisList<T> : IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable where T : IGorgonGamingDeviceAxis
Type Parameters
Name Description
T

The type of axis data to store in this collection. This type must implement IGorgonGamingDeviceAxis.

Properties

| Edit this page View Source

Count

Property to return the number of axes on the gaming device.

Declaration
public int Count { get; }
Property Value
Type Description
int
| Edit this page View Source

this[GamingDeviceAxis]

Property to return the range for the specified GamingDeviceAxis.

Declaration
public T this[GamingDeviceAxis axis] { get; }
Parameters
Type Name Description
GamingDeviceAxis axis
Property Value
Type Description
T
| Edit this page View Source

this[int]

Gets the GorgonGamingDeviceAxisInfo at the specified index in the axis list.

Declaration
public T this[int index] { get; }
Parameters
Type Name Description
int index
Property Value
Type Description
T

Methods

| Edit this page View Source

Contains(GamingDeviceAxis)

Function to determine if a specific GamingDeviceAxis is supported.

Declaration
public bool Contains(GamingDeviceAxis axis)
Parameters
Type Name Description
GamingDeviceAxis axis

Axis to look up.

Returns
Type Description
bool

true if the axis is supported, false if not.

| Edit this page View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type Description
IEnumerator<T>

An enumerator that can be used to iterate through the collection.

| Edit this page View Source

TryGetValue(GamingDeviceAxis, out T)

Function to retrieve a GorgonGamingDeviceAxisInfo.

Declaration
public bool TryGetValue(GamingDeviceAxis axis, out T result)
Parameters
Type Name Description
GamingDeviceAxis axis

The axis to look up.

T result

The GorgonGamingDeviceAxisInfo specified by the axis.

Returns
Type Description
bool

true if the axis was found in this list, or false if not.

Remarks

If the axis was not found, then the result parameter will return a GorgonGamingDeviceAxisInfo with default values. Because of this, it is strongly recommened to use the method return value to determine if the item exists or not.

Implements

IReadOnlyList<T>
IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author