Show / Hide Table of Contents

Class SurfaceExtensions

Offers some extensions and helper-methods for the work with the surface.

Inheritance
object
SurfaceExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public static class SurfaceExtensions

Methods

| Edit this page View Source

AlignDevices(RGBSurface)

Automatically aligns all devices to prevent overlaps.

Declaration
public static void AlignDevices(this RGBSurface surface)
Parameters
Type Name Description
RGBSurface surface
| Edit this page View Source

Attach(RGBSurface, IEnumerable<IRGBDevice>)

Attaches the specified devices to the surface.

Declaration
public static void Attach(this RGBSurface surface, IEnumerable<IRGBDevice> devices)
Parameters
Type Name Description
RGBSurface surface

The surface the devices are attached to.

IEnumerable<IRGBDevice> devices

The devices to attach.

| Edit this page View Source

Detach(RGBSurface, IEnumerable<IRGBDevice>)

Detaches the specified devices from the surface.

Declaration
public static void Detach(this RGBSurface surface, IEnumerable<IRGBDevice> devices)
Parameters
Type Name Description
RGBSurface surface

The surface the devices are detached from.

IEnumerable<IRGBDevice> devices

The devices to detach.

| Edit this page View Source

GetDevices(RGBSurface, RGBDeviceType)

Gets all devices of the specified RGBDeviceType.

Declaration
public static IEnumerable<IRGBDevice> GetDevices(this RGBSurface surface, RGBDeviceType deviceType)
Parameters
Type Name Description
RGBSurface surface

The surface to get the devices from.

RGBDeviceType deviceType

The RGBDeviceType of the devices to get.

Returns
Type Description
IEnumerable<IRGBDevice>

A collection of devices matching the specified RGBDeviceType.

| Edit this page View Source

GetDevices<T>(RGBSurface)

Gets all devices of a specific type.

Declaration
public static IEnumerable<T> GetDevices<T>(this RGBSurface surface) where T : class
Parameters
Type Name Description
RGBSurface surface
Returns
Type Description
IEnumerable<T>

A collection of devices with the specified type.

Type Parameters
Name Description
T

The type of devices to get.

| Edit this page View Source

Load(RGBSurface, IRGBDeviceProvider, RGBDeviceType, bool)

Initializes the specifiec device provider and attaches all devices.

Declaration
public static void Load(this RGBSurface surface, IRGBDeviceProvider deviceProvider, RGBDeviceType loadFilter = (RGBDeviceType)-1, bool throwExceptions = false)
Parameters
Type Name Description
RGBSurface surface

The surface to attach the devices to.

IRGBDeviceProvider deviceProvider

The device provider to load.

RGBDeviceType loadFilter

RGBDeviceType-flags to filter the devices to load.

bool throwExceptions

Specifies if exceptions should be thrown or silently be ignored.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX